Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

specifying libraries when linking with ifort for Windows

connell
Beginner
1,157 Views
In the Linux versions of Ifort you can specify libraries by using the following syntax
-L$path -lname1 -lname2
i.e -L specifies the directory to search and l the libs in that directory. Is there any wayof doing something similar with the windows versions?
0 Kudos
1 Reply
Steven_L_Intel1
Employee
1,157 Views
You can, but it's a bit more complicated. The compiler itself doesn't have a switch for this but the linker does. So you would write:

ifort foo.obj /link /libpath:pathtolibs lib1.lib lib2.lib

The /link tells ifort that everything that follows is for the linker.

You can also add the library path to the definition of the LIB environment variable which will accomplish the same thing.
0 Kudos
Reply