- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have written a small console application in Fortran which calls gelss routine. The application runs in DEBUG configuration. I then copied the various include and link information to a RELEASE configuration. The command line options for Fortran and Linker tabs are shown below:
/nologo /debug:full /Od /I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.3.210\windows\mkl\include\ia32" /warn:interfaces /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc140.pdb" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /Qmkl:parallel /c
/nologo /O2 /I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.3.210\windows\mkl\include\ia32" /module:"Release\\" /object:"Release\\" /Fd"Release\vc140.pdb" /libs:dll /threads /c
/OUT:"Debug\Console1.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\mkl\lib\ia32_win" /LIBPATH:"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\lib\ia32_win" /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" /MANIFEST /MANIFESTFILE:"Debug\Console1.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\RMA\Technical_Notes\Distributing a Point Load\DPL\Console1\Debug\Console1.pdb" /SUBSYSTEM:CONSOLE /IMPLIB:"C:\RMA\Technical_Notes\Distributing a Point Load\DPL\Console1\Debug\Console1.lib" mkl_lapack95.lib mkl_core.lib mkl_sequential.lib mkl_intel_thread.lib
/OUT:"Release\Console1.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\mkl\lib\ia32_win" /LIBPATH:"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\lib\ia32_win" /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" /MANIFEST /MANIFESTFILE:"Release\Console1.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /IMPLIB:"C:\RMA\Technical_Notes\Distributing a Point Load\DPL\Console1\Release\Console1.lib" mkl_lapack95.lib mkl_core.lib mkl_sequential.lib mkl_intel_thread.lib
The application runs in DEBUG but in RELEASE gives the following issues:
Linking... Link /OUT:"Release\Console1.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\mkl\lib\ia32_win" /LIBPATH:"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\lib\ia32_win" /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" /MANIFEST /MANIFESTFILE:"Release\Console1.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /IMPLIB:"C:\RMA\Technical_Notes\Distributing a Point Load\DPL\Console1\Release\Console1.lib" mkl_lapack95.lib mkl_core.lib mkl_sequential.lib mkl_intel_thread.lib -qm32 "Release\DPL.obj" mkl_lapack95.lib(dgelss.obj) : error LNK2019: unresolved external symbol _DGELSS referenced in function _DGELSS_F95 mkl_lapack95.lib(dgelss.obj) : error LNK2019: unresolved external symbol _XERBLA referenced in function _DGELSS_F95 Release\Console1.exe : fatal error LNK1120: 2 unresolved externals
Can anyone please point me to my error?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The commands that you showed are somewhat mangled, but I suspect that the problem is that the order of specifying the libraries is incorrect.
Linkers scan libraries for unsatisfied externals. Since you specified the three MKL libraries before the OBJ file, there were no unsatisfied externals at that time. Move the names of the three MKL libraries to a position after mkl_lapack95.lib in the linker command, and try again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay. I've tried that (see below) but the problem remains?
/OUT:"Release\Console1.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\mkl\lib\ia32_win" /LIBPATH:"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\lib\ia32_win" /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" /MANIFEST /MANIFESTFILE:"Release\Console1.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /IMPLIB:"C:\RMA\Technical_Notes\Distributing a Point Load\DPL\Console1\Release\Console1.lib" mkl_core.lib mkl_sequential.lib mkl_intel_thread.lib mkl_lapack95.lib
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, I've changed the switch in the Fortran properties to use the MKL libraries:
/nologo /O2 /I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.3.210\windows\mkl\include\ia32" /module:"Release\\" /object:"Release\\" /Fd"Release\vc140.pdb" /libs:static /threads /Qmkl:parallel /c
It now compiles and links...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The part "mkl_core.lib mkl_sequential.lib mkl_intel_thread.lib mkl_lapack95.lib" is wrong. The last item, i.e., mkl_lapack95.lib, must come before the the others.
Instead of trying arbitrary changes, please consult the MKL Link Line Advisor at https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, well it was before the other mkl libraries in my original version. Either way it does not appear to work.
If I use the Link Line Advisor then it suggests the following:
mkl_lapack95.lib mkl_intel_c.lib mkl_sequential.lib mkl_core.lib
Which seems curious since I have not linked mkl_intel_c.lib yet it still runs.

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