Reputation: 1845
I have problem with boost library, when i try compilling simple program g++ show me "No such file or directory". I installed boost in /home/user/boost (there i have two folders "include" and "lib"). I found bash script which no solved my problem :
export LD_LIBRARY_PATH=/home/user/boost:${LD_LIBRARY_PATH}
Can anyone help me ?
Upvotes: 0
Views: 4272
Reputation: 15184
This depends on your user-installed boost directory structure. If your include files are now in /home/user/boost/include/boost, then add a:
g++ -I/home/user/boost/include/boost ...
to your compilation options. See here. LD_LIBRARY_PATH
won't help, this is only important for executing programs that look for shared libraries in the file system. It is like a "PATH" for dynamic link libraries. If you got your code compiled, then add the directory location of your boost libraries in the link step by:
g++ -L/home/user/boost/lib
or whatever the location is.
Upvotes: 1