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 have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
29305 Discussions

Error in appending additional command line options

Steefel__Carl
Beginner
1,626 Views
Trying to link statically with all libraries, including OpenMp. I append the following commands in the Project --> Fortran --> Command Line drop down in Intel Visual Fortran 11.1 (using Microsoft Visual Studio 2008):

/Qopenmp-link:static /Qopenmp /MT

and I get the warning during the final link:

1>Link: warning #10006: ignoring unknown option '/Qopenmp-link:static'
1>Link: warning #10006: ignoring unknown option '/Qopenmp'
1>LINK : warning LNK4044: unrecognized option '/MT'; ignored

which presumably explains why the static link doesn't work. Why aren't these commands taken when provided as Additional Options in Command Line inside the IDE environment????
0 Kudos
5 Replies
Steven_L_Intel1
Employee
1,626 Views

The error messages indicate that you added these to the Linker > Command Line property page rather than the Fortran > Command Line page. You should not need to specify either /Qopenmp nor /MT as command line options as both of those are available as regular properties (Language page for /Qopenmp and Libraries page for /MT, which is the same as the default of /libs:static /threads.)
0 Kudos
Steefel__Carl
Beginner
1,626 Views

The error messages indicate that you added these to the Linker > Command Line property page rather than the Fortran > Command Line page. You should not need to specify either /Qopenmp nor /MT as command line options as both of those are available as regular properties (Language page for /Qopenmp and Libraries page for /MT, which is the same as the default of /libs:static /threads.)
OK, I got rid of the error message. However, the code still does not create a fully static library. It is still looking for libiomp5md.dll (the dynamic version)...
0 Kudos
Steven_L_Intel1
Employee
1,626 Views
Are you building a library or an executable? If a library, then you're dependent on what the executable's build options are - if it is compiled /Qopenmp, it will look for libiomp5md.dll by default. There's no way to control that from a static library.
0 Kudos
Steefel__Carl
Beginner
1,626 Views
Are you building a library or an executable? If a library, then you're dependent on what the executable's build options are - if it is compiled /Qopenmp, it will look for libiomp5md.dll by default. There's no way to control that from a static library.
First I build the library, then the executable with a link to that library. So perhaps the library should not be built with /Qopenmp??

Anyway, I never had this problem before--I could always build a fully static executable...
0 Kudos
Steven_L_Intel1
Employee
1,626 Views

In version 11.0, we changed the default for the OpenMP library to use the DLL form. You can still build a fully static executable if you use /Qopenmp-link:static when building the executable. Actually, what you set here for a static library project is likely ignored since those default to "Disable OBJCOMMENT Library Names in Object: Yes".
0 Kudos
Reply