- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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????
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
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.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
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.
Anyway, I never had this problem before--I could always build a fully static executable...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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".

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