Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Can't find library libmkl_intel_lp64 OS X

edward_h_1
Beginner
1,191 Views

using OS X 10.10.3 with fresh install of mkl and Eclipse MARS.2

 

from the command line I run:

gcc nec2c.o somnec.o misc.o -l /opt/intel/mkl/lib/lib

and get

ld: library not found for -l/opt/intel/mkl/lib/libmkl_intel_lp64

but it is there:

ls /opt/intel/mkl/lib/libmkl_intel_lp64.a

/opt/intel/mkl/lib/libmkl_intel_lp64.a 

 

BUT... if I leave out the '-l' flag, the file

is found and linked (and, of course, results in

many other unresolved references).

 

If I put in the '-L' flag to point to the directory

and just '-llibmkl_intel_lp64' I get the same results.

 

Any idea why gcc can't find the libraries?  Is there a

file or directory privileges issue, perhaps?

 

thanks....

0 Kudos
2 Replies
edward_h_1
Beginner
1,191 Views

Folks:

Sorry to have bothered you...

turns out you should leave out the 'lib' in 'libmkl_intel_lp64'.

Not sure how I should have known it but... well... there it is.

Thanks to all who took the time.

ward
 

 

0 Kudos
mecej4
Honored Contributor III
1,191 Views

The topic of standard library naming, creation and usage conventions in Unix/Linux is something that is worth becoming familiar with.

See, for example, http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html .

In particular, note that the -l (lower case L) and -L linker options (usually passed by compiler drivers to the linker ld, or directly to ld) have quite different meanings.

0 Kudos
Reply