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

Usage of -L flag wih mpiifx command

Engineer99
Beginner
619 Views

Hi,
I am trying to compile a Fortran code using mpiifx command. The code needs to acces .mod files in a library with ".a" extension. I tried to use "-L" and "-l" flags but I get the following error. Could you please help me about it ? My command and following error is;

mpiifx -fpp -free -O3 amrvac.o mod_usr.o -o amrvac -L"C:/Users/kadir/OneDrive/Belgeler/amrvac-master/lib/1d_intel" -lamrvac

ifx: command line warning #10006: ignoring unknown option '/LC:/Users/kadir/OneDrive/Belgeler/amrvac-master/lib/1d_intel'
ifx: command line warning #10006: ignoring unknown option '/lamrvac'
link: unknown option -- s
Try 'link --help' for more information.
ERROR in the compiling/linking [1]

I am using Windows. Thank you in advance.

0 Kudos
1 Solution
Shiquan_Su
Moderator
438 Views

Hi, there. This reads like a Windows env usage issue, not the compiler product issue. In Windows, there is no -L, the equivalent is /LIBPATH. You probably need to do something similar to the following:

mpiifx /LIBPATH:C:\path\to\library myprogram.f90 -lmylibrary


View solution in original post

0 Kudos
2 Replies
Shiquan_Su
Moderator
439 Views

Hi, there. This reads like a Windows env usage issue, not the compiler product issue. In Windows, there is no -L, the equivalent is /LIBPATH. You probably need to do something similar to the following:

mpiifx /LIBPATH:C:\path\to\library myprogram.f90 -lmylibrary


0 Kudos
Reply