Apple Mach-O Linker Direct Access Warning in ... Global Weak Character

I am using xcode 4.2 with iOS 5.0 sdk building iphone app. In addition, I import the opencv library and write some * .cpp codes with opencv functions. However, I got a lot of similar "apple mach-o linker waring"

For instance -

ld: warning: direct access to __ZN15CvBlobTrackerCCC2Ev to the global weak character __ZTV9CvBlobSeq means that the weak character cannot be redefined at run time. This is probably due to the fact that different translation units are compiled with different visibility settings.

ld: warning: direct access to __ZN18CvBlobTrackerAuto1C2EP23CvBlobTrackerAutoParam1 to the global weak character __ZTV9CvBlobSeq means that the weak character cannot be redefined at run time. This is probably due to the fact that different translation units are compiled with different visibility settings.

How can i solve this? Thanks!

edit: just find out xcode with boost: linker (Id) Warning on visibility settings

+6
source share
1 answer

Apple Mach-O Linker Warning appears in the following cases

1. When the corresponding file was not correctly attached to the target. 2. When the corresponding file structure is not associated with code. 3.File implementation so that the compiler gets confused

Please check your case against them.

If anyone finds any other reasons that I have not listed above, add him to the list.

0
source

Source: https://habr.com/ru/post/908679/


All Articles