Linking to Boost.Signals using Xcode

I can’t get Xcode for life for the correct link to Boost.Signals. I created Boost using MacPorts, and even got to the point of loading Boost and manually creating it.

I set the library search paths to include / opt / local / lib, and added "-lboost_signals-mt" to the other linker flags. I tried to drag the libraries into the Frameworks folder. I tried to add libraries to the build target.

I always get the error that "the file does not have the required architecture".

To make sure that the problem is related to Xcode, I went ahead and wrote a make file to create the project - it works fine using the same linker flag as above.

Any ideas?

+1
source share
1 answer

Check the target architecture in the Xcode project. It looks like you are trying to compile a universal binary. Unless you explicitly ask about this, boost will only be built for the architecture of the build machine.

0
source

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


All Articles