Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot not find library files in eclipse cdt

properties/C/C++ Build/Settings GCC C++ Linker/Libraries

Under libraries(-I) I have libbost_system libbost_filesystem ... and under Library search path(-L) I have /home/etobkru/boost_1_43_0/boostBinaries/lib

but when I compile I get g++ -L/home/etobkru/boost_1_43_0/boostBinaries/lib/ -o"searchDirs" ./main.o -llibboost_system -llibboost_filesystem -llibboost_regex /usr/lib/gcc/i586-suse-linux/4.1.2/../../../../i586-suse-linux/bin/ld: cannot find -llibboost_system

I have tried with libbost_system.so and libbost_system.a but i get the same error. What am I doing wrong and why cant eclipse find the files. Because they are there?

like image 720
hidayat Avatar asked Dec 13 '22 21:12

hidayat


2 Answers

You don't need the "lib" part in the name. Just link with

-lboost_system -lboost_filesystem -lboost_regex
like image 101
Troubadour Avatar answered Dec 25 '22 19:12

Troubadour


I think this is similar to /usr/bin/ld: cannot find -llibeststring.a

Did you try -lboost_system? The -l option doesn't expect the leading lib or the trailing .a or .so.

like image 41
Mark B Avatar answered Dec 25 '22 21:12

Mark B