1

I am trying the following: gcc -o foo foo.c -L /path/to/directory/containing/libimf.so -limf and I have used 'log2' function in foo.c. I want it to link with Intel optimized library function but I am getting the following error

/usr/bin/ld: skipping /path/to/libimf.so when searching for -limf

/usr/bin/ld: cannot find -limf

collect2: error: ld returned 1 exit status

user1669844
  • 703
  • 9
  • 23

2 Answers2

0

I was using the wrong libimf.so for the linking. There were two different libimf.so at two different locations corresponds to Intel MIC and Intel IA64 architecture. It worked with correct one(IA-64).

user1669844
  • 703
  • 9
  • 23
-1

Argument -L expects a directory, not a file.

Klemen
  • 69
  • 7