Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29277 Discussions

libifcore is not found during linking

kvtournh
Beginner
2,185 Views

Hi,

I try to compile a c++ program and have to link it with a fortran library which needs the ifcore library from ifort. I do the following which should work (afaik)

$ icpc -O3 -xP -axP -no-ipo -o blub blub.o fortlib.a -lifcore
ld: cannot find -lifcore

libifcore.so, libifcore.so.5 and libifcore.a are all included in the directory /usr/local/intel/fce/9.1.036/lib/ and this directory is located in /etc/ld.conf.so

$ ls -l /usr/local/intel/fce/9.1.036/lib/*ifcore*
-rw-r--r-- 1 root root 1229946 Jul 7 2006 /usr/local/intel/fce/9.1.036/lib/libifcore.a
-rw-r--r-- 1 root root 1260052 Jul 7 2006 /usr/local/intel/fce/9.1.036/lib/libifcoremt.a
-rw-r--r-- 1 root root 1265484 Jul 7 2006 /usr/local/intel/fce/9.1.036/lib/libifcoremt_pic.a
-rwxr-xr-x 1 root root 27 Jul 7 2006 /usr/local/intel/fce/9.1.036/lib/libifcoremt.so*
-rwxr-xr-x 1 root root 969224 Jul 7 2006 /usr/local/intel/fce/9.1.036/lib/libifcoremt.so.5*
-rw-r--r-- 1 root root 1234150 Jul 7 2006 /usr/local/intel/fce/9.1.036/lib/libifcore_pic.a
-rwxr-xr-x 1 root root 25 Jul 7 2006 /usr/local/intel/fce/9.1.036/lib/libifcore.so*
-rwxr-xr-x 1 root root 951040 Jul 7 2006 /usr/local/intel/fce/9.1.036/lib/libifcore.so.5*

$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/X11R6/lib
/usr/lib/qt3/lib64
/usr/local/lib/root
/usr/local/intel/cc/9.1.042/lib
/usr/local/intel/cce/9.1.042/lib
/usr/local/intel/fce/9.1.036/lib

$ ldconfig -p | grep ifcore

libifcoremt.so.5 (libc6,x86-64) => /usr/local/intel/fce/9.1.036/lib/libifcoremt.so.5

libifcore.so.5 (libc6,x86-64) => /usr/local/intel/fce/9.1.036/lib/libifcore.so.

So ... what is going wrong here? I think everything is fine.

Thanks for the help

Klaas

0 Kudos
1 Reply
Steven_L_Intel1
Employee
2,185 Views
I'll admit that I'm not that knowledgable about Linux and have not heard of this ld.so.conf file. What happens if you use ifort to do the linking? If you do so, use -nofor_main -cxxlib as well.
0 Kudos
Reply