Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking boost libraries

I have downloaded the boost library (version 1.46.1), but I don't know how to link it through xcode.I found an old question says to put the -lfftw3 flag, so I've put it.
I also added the path: /home/Documents/C++/boost_1_46_1 (it's the directory where I have put the library), but I am getting an error from the linker:

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  

So the question are two:
1)How to manage xcode to link boost?
2)Where to put the library in file system? In linux there was /usr/lib, here there isn't this path, should I put it in /Developer/usr/lib?

like image 696
Ramy Al Zuhouri Avatar asked Apr 21 '12 20:04

Ramy Al Zuhouri


1 Answers

Or for those who are looking for a quick answer (and are on linux), the magic is simply to add the following flags:

-l boost_system
like image 188
Wolfer Avatar answered Sep 28 '22 10:09

Wolfer