链接到利用X code Boost.Signals [英] Linking to Boost.Signals using Xcode
问题描述
我不能为我的生命得到X code到正确链接到Boost.Signals。我一直在使用MacPorts的内置升压,我甚至于下载提升自己和手动构建它去了。
I can't for the life of me get Xcode to link to Boost.Signals properly. I've built Boost using MacPorts, and I even went as far as downloading Boost myself and manually building it.
我已经设置库搜索路径包含的/ opt / local / lib目录,和我添加-lboost_signals-MT到其它链接器标记。我试过拖放库到框架文件夹中。我试着添加库创建目标。
I've set the Library Search Paths to include /opt/local/lib, and I've added "-lboost_signals-mt" to the Other Linker Flags. I've tried dragging and dropping the libraries into the Frameworks folder. I've tried adding the libraries to the build target.
我总是得到错误的文件是所需的体系结构不。
I always get the error that the "file is not of required architecture."
只是为了确保该问题是与X code,我继续写了一个makefile来构建项目 - 它工作得很好,用上述同样的链接器标记
Just to make sure the problem was with Xcode, I went ahead and wrote a makefile to build the project--it works fine, using the same linker flag shown above.
任何想法?
推荐答案
检查目标架构,你的X code项目。它看起来像你试图编译一个通用二进制。除非你明确要求它,升压建成后将为构建机器的体系结构只。
Check the target architecture in your Xcode project. It looks like you're trying to compile a universal binary. Unless you explicitly ask for it, boost will be built for the architecture of the build machine only.
这篇关于链接到利用X code Boost.Signals的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!