- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to statically link the MKL libraries into my application by setting Fortran => Libraries => Runtime Library = "Multithreaded" in Windows Fortran XE Pro 17.0 Update 2 with VS2015. In the 32-bit version I get the following:
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
followed by:
MSVCRT.lib(_chandler4gs_.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4.
If I switch to Fortran => Libraries => Runtime Library = "Multithread DLL" and don't change anything else then it works fine. The 64-bit version works fine with either "Multithread DLL" or "Multithreaded" and so it is just a 32-bit problem. If I use /NODEFAULTLIB:library (as suggested in the first error message) then I get a whole lot of other unresolved externals.
I have attached the vfproj and BuildLog files for both the Multithread DLL and Multithreaded versions. Just look at the 32-bit Release settings in the vfproj. What am I doing wrong?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The first error was actually libucrt.lib(log10.obj) : error LNK2005: _log10 already defined in libmmd.lib(libmmd.dll)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your project depends on two additional libraries: "FortranLib.Lib PlateLib.Lib". If they were generated by Intel Fortran compiler did you set the same runtime library type for them?
Thanks,
Xiaoping Duan
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Xiaoping, I had FortranLib.lib and PlateLib.lib set to Multithreaded DLL (different to the main application) because I thought since they are just libraries their runtime library setting wouldn't matter. I have changed them to match the main application and it now works!! Thanks.
I just have one more question - In the main application (SGSolver) library settings I have set /winapp and /Qmkl:parallel. Should I be using these same settings in FortranLib.lib and PlateLib.lib too or doesn't it matter?
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
schulzey wrote:
I just have one more question - In the main application (SGSolver) library settings I have set /winapp and /Qmkl:parallel. Should I be using these same settings in FortranLib.lib and PlateLib.lib too or doesn't it matter?
Peter
Both options will let compiler add directives to the generated object files so that some specific libraries can be linked without being explicitly provided to the linkage command line.
If the main application project has already set them you don't need set them again in FortranLib.lib and PlateLib.lib.
Thanks,
Xiaoping Duan
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Xiaoping, problem solved!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page