- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Keep getting a "library not found" error when the library does, in fact, exist:
deborah> set BLAS95=$MKLPATH/libmkl_blas95_lp64.a
deborah> ls -al $BLAS95
-rw-r--r-- 1 root 600 429896 Jul 26 2012 /opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/em64t/libmkl_blas95_lp64.a
deborah> ifort -l$BLAS95 hello.f90
ld: library not found for -l/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/em64t/libmkl_blas95_lp64.a
Using Mac OS X 10.7.5
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you specify the full path for a library, leave out the leading "-l" in the command that you use to do the linking.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The -l option tells the linker to decorate the given name, so in your case the linker is looking, in the default library paths, for a library named "lib/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/em64t/libmkl_blas95_lp64.a.a" ---i.e., the prefix "lib" and the suffix ".a" are added by the linker.
What you probably want is:
ifort -L$MKLPATH -lmkl_blas95_lp64 hello.f90
That is, the -L option tells the linker where to look for the library. If you don't want decoration, remove -l and provide the full library name, including extension. If you have more than one library, you'll probably need to surround them with -Wl,--start-group and -Wl,--end-group, since by default the linker checks archives only once and in the given order.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
gracias!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page