Thanks for the reply, ok I found out the shared object you mentioned, and it is located under
/home/utabak/intel/composerxe-2011/lib/intel64/libiomp5.so
so using -L /home/utabak/intel/composerxe-2011/lib/intel64/libiomp5.so -liomp5
after that I got another undefined reference with g++
/home/utabak/intel/composerxe-2011/lib/intel64/libiomp5.so: undefined reference to `pthread_atfork'
adding -pthread option to g++ solves this problem. Compile and link goes fine however running the binary gives a problem this time and, randomly, the error message changes from run to run. Investigating a bit more, I realized that If I compile the file with
icpc -parallel -o test1 test_binlib1.cc -I/home/utabak/external_libraries/boost_1_46_1 -L /opt/ansys-12.1/v121/ansys/syslib/linx64/ -L /opt/ansys-12.1/v121/ansys/customize/misc/linx64 -lbin
the executable works fine, however if I split that to a make file as such
CXX = icpc -g -parallel -Wall
IncludeDir = /home/utabak/external_libraries/boost_1_46_1
LinkingDir0 = /home/utabak/external_libraries/boost_1_46_1/stage/lib
LinkingDir1 = /opt/ansys-12.1/v121/ansys/syslib/linx64/
LinkingDir2 = /opt/ansys-12.1/v121/ansys/customize/misc/linx64
#LinkingDir3 = /home/utabak/intel/lib/intel64
LibLink1 = bin
LibLink2 = boost_filesystem
LibLink3 = boost_system
all: test1
test1: test_binlib1.o
${CXX} -o $@ $? -L${LinkingDir0} \
-L${LinkingDir1} -L${LinkingDir2} \
-l${LibLink1} -l${LibLink2} -l${LibLink3}
test_binlib1.o: test_binlib1.cc
${CXX} -I${IncludeDir} -c $?
compile and link goes fine but the executable does not work, it gives me an error with either segmentation fault due to this fortran function calls in C++ code or either file could not be opened for reading by again the fortran library function calls.
What is my error in buiding up the make file since the above given one liner compilation command works fine, I am pretty puzzled.
Best,
Umut