链接boost库

时间:2012-04-21 20:30:25

标签: c++ xcode boost linker

我已经下载了升级库(版本1.46.1),但我不知道如何通过xcode链接它。我发现一个老问题说要放-lfftw3标志,所以我把它放了。登记/> 我还添加了路径:/ home / Documents / C ++ / boost_1_46_1(这是我放置库的目录),但我从链接器收到错误:

ld: warning: directory not found for option '-L/home/ramy/Documents/C++/boost_1_46_1'
ld: library not found for -lfftw3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Command /Developer/usr/bin/clang++ failed with exit code 1  

所以问题是两个:
1)如何管理xcode链接提升?
2)将库放在文件系统中的位置?在linux中有/ usr / lib,这里没有这条路径,我应该把它放在/ Developer / usr / lib中吗?

1 个答案:

答案 0 :(得分:8)

对于那些正在寻找快速答案(并且在linux上)的人来说,神奇的只是添加以下标志:

-l boost_system