Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Compiling and linking from Eclipse in linux

j_a_dec
Beginner
303 Views

hello, I'm not sure what is going on here.  I just installed c++ compser xe 2013.0.079 and integrated it into Eclipse on linux.  When I try to build a test application which links to a shared library I get an error saying ld: cannot find -lfoo.so.  foo.so does exit in the specified directory and I've added the library directory to the search path in the project->properties in settings->Intel 64 C++ Linker->Libraries tab.  I've also appended the library directory to LD_LIBRARY_PATH.  In addition, I tried building on just the command line outside of eclipse and get the same error.  What am I doing wrong?

Here is the compiler output:

make -k all
Building file: ../src/test.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -I/home03/eclipse_workspace/foo/src -MMD -MP -MF"src/test.d" -MT"src/test.d" -c -o "src/test.o" "../src/test.cpp"
Finished building: ../src/test.cpp
 
Building target: Intel_cpp_test
Invoking: Intel Intel(R) 64 C++ Linker
icpc -L/home03/eclipse_workspace/foo/Release -o "Intel_cpp_test"  ./src/test.o   -lfoo.so
ld: cannot find -lfoo.so

0 Kudos
1 Reply
j_a_dec
Beginner
303 Views
....never mind ...I did something stupid, I added the .so part to the library name.
0 Kudos
Reply