- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I can successfully compile/link/execute a Visual Fortran (XE 12.0.3.175 [IA-32]) DEBUG version of an application using the MKL under MS Visual Studio 2008. However, when attempting to build a RELEASE version of the application, link errors pertaining to the MKL occur. For example:
[bash]error LNK2019: unresolved external symbol _SGETRF@24 referenced in ...[/bash]I have repeatedly checked to ensure the properties settings
[bash]Project > Properties > Configuration Properties > Linker > General > Additional Library Directories Project > Properties > Configuration Properties > Linker > Input > Additional Dependencies.[/bash]are identical for both DEBUG and RELEASE as per the Help information in
[bash]Configuring Intel Visual Fortran to Link with Intel MKL [/bash]I would appreciate guidance on how to locate/fix my mistakes.
Thanks,
-- jv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you mix objects compiled with /iface:cvf and those compiled without that option, you have to be extra careful since /iface:cvf does not give you fine enough control. You may need to use !DEC$ directives.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please check your project settings, clean and rebuild. If you still get the same message, attach the build-log to your reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the helpful feedback. I now have a better understanding of the error.
My intention is to use the CVF call interface because of a dependency on an external library.
I am a novice user of the Visual Studio tool so I probably have made a mistake in its use regarding RELEASE and DEBUG builds. So far, I can not find the mistake.
As suggested, I have repeatedly performed a clean operation prior to a rebuild; the link error persists.
I have included the logs from the two stages of the RELEASE build; in Visual Studio parlance the Solution comprises a Library Project and an executable Project that uses the library. Note, this library is not the external dependency mentioned in the first paragraph above. Also note, the MKL dependencies are in my project library (not in the external dependency library).
Here is the build log for the library project:
[bash]Build Log Build started: Project: SUVI Thematic Maps Lib, Configuration: Release|Win32 Output Compiling with Intel Visual Fortran Compiler XE 12.0.3.175 [IA-32]... ifort /nologo /I"C:Program FilesIntelComposerXE-2011mklinclude" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Releasevc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\bin" "C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSUVI Thematic MapsSUVI Thematic Maps Libsource filestesting.f90" ifort /nologo /I"C:Program FilesIntelComposerXE-2011mklinclude" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Releasevc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /iface:cvf /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\bin" "C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSUVI Thematic MapsSUVI Thematic Maps Libsource filesarithmetic.f90" ifort /nologo /I"C:Program FilesIntelComposerXE-2011mklinclude" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Releasevc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\bin" "C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSUVI Thematic MapsSUVI Thematic Maps Libsource filesglobals.f90" ifort /nologo /I"C:Program FilesIntelComposerXE-2011mklinclude" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Releasevc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\bin" "C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSUVI Thematic MapsSUVI Thematic Maps Libsource filesutils.f90" ifort /nologo /I"C:Program FilesIntelComposerXE-2011mklinclude" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Releasevc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\bin" "C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSUVI Thematic MapsSUVI Thematic Maps Libsource filesdate_time.f90" ifort /nologo /I"C:Program FilesIntelComposerXE-2011mklinclude" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Releasevc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\bin" "C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSUVI Thematic MapsSUVI Thematic Maps Libsource filescfitsio.f90" ifort /nologo /I"C:Program FilesIntelComposerXE-2011mklinclude" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Releasevc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\bin" "C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSUVI Thematic MapsSUVI Thematic Maps Libsource filesfiles.f90" ifort /nologo /I"C:Program FilesIntelComposerXE-2011mklinclude" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Releasevc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\bin" "C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSUVI Thematic MapsSUVI Thematic Maps Libsource fileslogging.f90" ifort /nologo /I"C:Program FilesIntelComposerXE-2011mklinclude" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Releasevc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\bin" "C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSUVI Thematic MapsSUVI Thematic Maps Libsource filescomposite_products.f90" ifort /nologo /I"C:Program FilesIntelComposerXE-2011mklinclude" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Releasevc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\bin" "C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSUVI Thematic MapsSUVI Thematic Maps Libsource filesconfiguration.f90" ifort /nologo /I"C:Program FilesIntelComposerXE-2011mklinclude" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Releasevc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\bin" "C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSUVI Thematic MapsSUVI Thematic Maps Libsource filesprobability.f90" ifort /nologo /I"C:Program FilesIntelComposerXE-2011mklinclude" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Releasevc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /iface:cvf /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\bin" "C:Documents and Settingsjim.vickroyMy DocumentsVisual Studio 2008ProjectsSUVI Thematic MapsSUVI Thematic Maps Libsource filestheme_products.f90" Creating library... Lib /OUT:"Release/SUVI Thematic Maps Lib.lib" /NOLOGO "Releasetesting.obj" "Releasearithmetic.obj" "Releaseglobals.obj" "Releaseutils.obj" "Releasedate_time.obj" "Releasecfitsio.obj" "Releasefiles.obj" "Releaselogging.obj" "Releasecomposite_products.obj" "Releaseconfiguration.obj" "Releaseprobability.obj" "Releasetheme_products.obj" xilib: executing 'lib' SUVI Thematic Maps Lib - 0 error(s), 0 warning(s)
[/bash]
Here is the build log for the executable project:
Build Log
Build started: Project: SUVI Thematic Maps Demo, Configuration: Release|Win32
Output
Compiling with Intel Visual Fortran Compiler XE 12.0.3.175 [IA-32]...
ifort /nologo /I"C:\Documents and Settings\jim.vickroy\My Documents\Visual Studio 2008\Projects\SUVI Thematic Maps\SUVI Thematic Maps Lib\Release" /iface:cvf /module:"Release\" /object:"Release\" /Fd"Release\vc90.pdb" /libs:static /threads /c /libs:dll cfitsio.lib /MD /fpp /extfpp:cfortran.h,fitsio.h /Qvc9 /Qlocation,link,"c:\Program Files\Microsoft Visual Studio 9.0\VC\\bin" "C:\Documents and Settings\jim.vickroy\My Documents\Visual Studio 2008\Projects\SUVI Thematic Maps\SUVI Thematic Maps Demo\source files\demo.f90"
Linking...
Link /OUT:"Release\SUVI Thematic Maps Demo.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Documents and Settings\jim.vickroy\My Documents\Libraries" /LIBPATH:"C:\Program Files\Intel\ComposerXE-2011\mkl\lib\ia32" /MANIFEST /MANIFESTFILE:"C:\Documents and Settings\jim.vickroy\My Documents\Visual Studio 2008\Projects\SUVI Thematic Maps\SUVI Thematic Maps Demo\Release\SUVI Thematic Maps Demo.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /IMPLIB:"C:\Documents and Settings\jim.vickroy\My Documents\Visual Studio 2008\Projects\SUVI Thematic Maps\SUVI Thematic Maps Demo\Release\SUVI Thematic Maps Demo.lib" cfitsio.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib "Release\demo.obj" "C:\Documents and Settings\jim.vickroy\My Documents\Visual Studio 2008\Projects\SUVI Thematic Maps\SUVI Thematic Maps Lib\Release\SUVI Thematic Maps Lib.lib"
Link: executing 'link'
SUVI Thematic Maps Lib.lib(probability.obj) : error LNK2019: unresolved external symbol _SGETRF@24 referenced in function _COVARIANCE_MATRIX_COMPONENT_mp_COVARIANCE_MATRIX_INVERT
SUVI Thematic Maps Lib.lib(probability.obj) : error LNK2019: unresolved external symbol _SGETRI@28 referenced in function _COVARIANCE_MATRIX_COMPONENT_mp_COVARIANCE_MATRIX_INVERT
Release\SUVI Thematic Maps Demo.exe : fatal error LNK1120: 2 unresolved externals
SUVI Thematic Maps Demo - 3 error(s), 0 warning(s)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you mix objects compiled with /iface:cvf and those compiled without that option, you have to be extra careful since /iface:cvf does not give you fine enough control. You may need to use !DEC$ directives.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wow ! Thanks ! I really appreciate your quick response and willingness to wade through the build logs.
Using mk_intel_s.lib (in place of mkl_intel_c.lib) resulted in successful compilation, linking, and execution.
I don't know if I would have ever resolved this.
It was (un)fortunate the DEBUG version worked with mkl_intel_c.lib.

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