Reputation: 3927
I have 3rd parties libraries that don't placed under "/usr/lib". I defined their path in eclipse library search path . The project compile and linkage well, but when i run project i got exception that library doesn't found. if i copy the 3rd party library to "/usr/lib" than it run ok.
I believe that this is path issue (i am new to cpp), how do i configure this in eclipse ?
Thank you
Upvotes: 0
Views: 851
Reputation: 8239
First of all, since it's crashing during runtime, you are linking against dynamic libraries (libWhatever.so), so you have to add your library path to the LD_LIBRARY_PATH
environment variable. Otherwise, you could force the linker to link statically to static libraries (libWhatever.a), using the -static
flag.
Upvotes: 1