- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-L -l are Linux only flags.
Please refer to this on how to pass flags to the linker:
and this is also helpful:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

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