- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I build an static library with visual studio 2008|Intel XE 2013. The resulting "mystatic.lib" file forces the .dll that links with it (from another project) to link with some intel .libs (libmmd.lib, libirc.lib...), but that DLL is built in MSVC, not Intel.
I solve this linking with the static libraries (libmmds.lib, svml_disp.lib...) and adding the following pragmas to the project that builds the .lib file:
#if defined(__INTEL_COMPILER) && defined(MYSTATICLIB)
# if defined(_MT) && defined(_DLL)
# pragma comment(linker, "/NODEFAULTLIB:libmmd")
# pragma comment(linker, "/NODEFAULTLIB:libirc")
# pragma comment(linker, "/NODEFAULTLIB:libdecimal")
# pragma comment(linker, "/NODEFAULTLIB:svml_disp")
# pragma comment(linker, "/NODEFAULTLIB:svml_dispmd")
# endif
#endif
So the user that link with our .lib created with intel compiler, from his msvc DLL project.
My question is: is there a way to avoid thesse pragmas? I can't find out where the intel compiler adds these default lib dependencies to the static lib.
Searching internet I found a compiler flag -static-intel, but building the static librari intel doesn't recognize it. I suspect that it is only valid for building .dll/.exe, not .lib static files.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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