linking problem?

linking problem?

So I installed the compiler into my local directory, icc/root/dir/.

I tried to compile a sample code by using

icc/root/dir/bin/icc -Licc/root/dir/lib -Qtm_enabled -openmp intel_stm_test_virtual.cpp -o virtual

However, even though I have used -L option to indicate the shared object lib (as seen above), the compiler still cannot find libguide.so and libitm.so (which is located under icc/root/dir/lib). I also set $LD_LIBRARY_PATH to irc/root/dir/lib but these shared objects are still not found.

Am I missing anything?

5 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

the following should work:

icc -c -openmp some_cpp_file -o some_result_file.o

then

icc -openmp -Lthe_path_to_your_lib_files -o my_binary some_result_file.o libguide.so libitm.so

I am not sure about the -openmp in the linking phase.

Hope this helps.

Nick

Hmm, that doesn't seem to work. If I run as suggested, then I got an error after the linking phrase

ld: libguide.so: No such file: No such file or directory

If I modified the code by changing libguide.so and others to their full path then I got the same error as originally posted when trying to run the program

./program_name: error while loading shared libraries: libguide.so: cannot open shared object file: No such file or directory

Any idea?

Hmmm ... you could try to copy the shared libraries into your current build directory to see if there is a typo in the path_to_your_lib.

Another ideea: could you please try also to specify absolute path files instead of relative?

Quoting - xino
Hmm, that doesn't seem to work. If I run as suggested, then I got an error after the linking phrase

ld: libguide.so: No such file: No such file or directory

If I modified the code by changing libguide.so and others to their full path then I got the same error as originally posted when trying to run the program

./program_name: error while loading shared libraries: libguide.so: cannot open shared object file: No such file or directory

Any idea?

Try specifying the full path starting from the root "/"

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi