<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic NMAKE unresolved external symbols in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NMAKE-unresolved-external-symbols/m-p/1095377#M23526</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm playing around with the custom dll builder tool (&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 13.008px;"&gt;windows\mkl\tools\builder)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;to make a stdcall BLAS dll for Win32.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I'm using&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;blas_stdcall_example_list&amp;nbsp;&lt;/SPAN&gt;provided in the same directory, with the following command:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;nmake libia32 export=blas_stdcall_example_list interface=stdcall name=mkl_blas_stdcall&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:;"&gt;Should I be doing anything differently?




C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.0.109\windows\mkl\tools\builder&amp;gt;nmake libia32 export=blas_stdcall_example_list interface=stdcall name=mkl_blas_stdcall

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        set Lib=..\..\lib\ia32;%Lib%;..\..\..\compiler\lib\ia32
        type "blas_stdcall_example_list" | findstr /V "^[;#]" &amp;gt;&amp;gt; user_def_file.def
Microsoft (R) Library Manager Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Microsoft (R) Library Manager Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

        link /DLL /MANIFEST /MACHINE:IX86 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libmmt.lib /NODEFAULTLIB:libirc.lib /NODEFAULTLIB:svml_dispmt.lib /NODEFAULTLIB:libdecimal.lib /def:user_def_file.def  .\temp_cdll\i_malloc_dll.obj .\temp_cdll\_vml_dll_core.obj   mkl_intel_s.lib mkl_intel_thread.lib mkl_core.lib  libiomp5md.lib  msvcrt.lib kernel32.lib user32.lib /out:"mkl_blas_stdcall".dll
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library mkl_blas_stdcall.lib and object mkl_blas_stdcall.exp
_vml_dll_core.obj : error LNK2019: unresolved external symbol _MKL_Thread_Free_Buffers referenced in function _DllMain@12
_vml_dll_core.obj : error LNK2019: unresolved external symbol _MKL_Finalize referenced in function _DllMain@12
mkl_blas_stdcall.dll : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.EXE"' : return code '0x460'
Stop.&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2017 09:27:31 GMT</pubDate>
    <dc:creator>Mikhail_K_</dc:creator>
    <dc:date>2017-02-14T09:27:31Z</dc:date>
    <item>
      <title>NMAKE unresolved external symbols</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NMAKE-unresolved-external-symbols/m-p/1095377#M23526</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm playing around with the custom dll builder tool (&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 13.008px;"&gt;windows\mkl\tools\builder)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;to make a stdcall BLAS dll for Win32.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I'm using&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;blas_stdcall_example_list&amp;nbsp;&lt;/SPAN&gt;provided in the same directory, with the following command:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;nmake libia32 export=blas_stdcall_example_list interface=stdcall name=mkl_blas_stdcall&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:;"&gt;Should I be doing anything differently?




C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.0.109\windows\mkl\tools\builder&amp;gt;nmake libia32 export=blas_stdcall_example_list interface=stdcall name=mkl_blas_stdcall

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        set Lib=..\..\lib\ia32;%Lib%;..\..\..\compiler\lib\ia32
        type "blas_stdcall_example_list" | findstr /V "^[;#]" &amp;gt;&amp;gt; user_def_file.def
Microsoft (R) Library Manager Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Microsoft (R) Library Manager Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

        link /DLL /MANIFEST /MACHINE:IX86 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libmmt.lib /NODEFAULTLIB:libirc.lib /NODEFAULTLIB:svml_dispmt.lib /NODEFAULTLIB:libdecimal.lib /def:user_def_file.def  .\temp_cdll\i_malloc_dll.obj .\temp_cdll\_vml_dll_core.obj   mkl_intel_s.lib mkl_intel_thread.lib mkl_core.lib  libiomp5md.lib  msvcrt.lib kernel32.lib user32.lib /out:"mkl_blas_stdcall".dll
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library mkl_blas_stdcall.lib and object mkl_blas_stdcall.exp
_vml_dll_core.obj : error LNK2019: unresolved external symbol _MKL_Thread_Free_Buffers referenced in function _DllMain@12
_vml_dll_core.obj : error LNK2019: unresolved external symbol _MKL_Finalize referenced in function _DllMain@12
mkl_blas_stdcall.dll : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.EXE"' : return code '0x460'
Stop.&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 09:27:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NMAKE-unresolved-external-symbols/m-p/1095377#M23526</guid>
      <dc:creator>Mikhail_K_</dc:creator>
      <dc:date>2017-02-14T09:27:31Z</dc:date>
    </item>
    <item>
      <title>Dear customer,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NMAKE-unresolved-external-symbols/m-p/1095378#M23527</link>
      <description>&lt;P&gt;Dear customer,&lt;/P&gt;

&lt;P&gt;I wonder did you changed the link line in makefile? The root cause is lack of mkl_intel_c.lib. I checked with your link line, seems you only link with mkl_intel_s but no mkl_intel_c. You could modify the makefile like before:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;IFACE_LIB_32=mkl_intel_c.lib
IFACE_LIB_32_DLL=mkl_intel_c_dll.lib

!if "$(interface)"=="std" || "$(interface)"=="stdcall" || "$(interface)"=="STD" || "$(interface)"=="STDCALL"
IFACE_LIB_32=$(IFACE_LIB_32) mkl_intel_s.lib
IFACE_LIB_32_DLL=$(IFACE_LIB_32_DLL) mkl_intel_s_dll.lib
!endif
....&lt;/PRE&gt;

&lt;P&gt;Like above, the &amp;nbsp;default interface layer lib is mkl_intel_c.lib, while you specify the interface as stdcall, both mkl_intel_c &amp;amp; mkl_intel_s will be used to link.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
	Fiona&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 04:07:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NMAKE-unresolved-external-symbols/m-p/1095378#M23527</guid>
      <dc:creator>Zhen_Z_Intel</dc:creator>
      <dc:date>2017-02-15T04:07:58Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NMAKE-unresolved-external-symbols/m-p/1095379#M23528</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;It worked! Thank you so much.&lt;/P&gt;

&lt;P&gt;But, no, I used the original makefile as is. The code (which I now have commented out and used yours instead) is exactly this:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;IFACE_LIB_32=mkl_intel_c.lib
IFACE_LIB_32_DLL=mkl_intel_c_dll.lib

!if "$(interface)"=="std" || "$(interface)"=="stdcall" || "$(interface)"=="STD" || "$(interface)"=="STDCALL"
IFACE_LIB_32=mkl_intel_s.lib
IFACE_LIB_32_DLL=mkl_intel_s_dll.lib
!endif&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 06:55:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NMAKE-unresolved-external-symbols/m-p/1095379#M23528</guid>
      <dc:creator>Mikhail_K_</dc:creator>
      <dc:date>2017-02-15T06:55:03Z</dc:date>
    </item>
    <item>
      <title>Dear Mikhail,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NMAKE-unresolved-external-symbols/m-p/1095380#M23529</link>
      <description>&lt;P&gt;Dear Mikhail,&lt;/P&gt;

&lt;P&gt;Oh, indeed.&amp;nbsp;IFACE_LIB_32 has been replaced only link to mkl_intel_s. I think you are using MKL 2017 gold. This problem has been fixed since 2017 update 1. Thanks.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
	Fiona&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 00:46:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NMAKE-unresolved-external-symbols/m-p/1095380#M23529</guid>
      <dc:creator>Zhen_Z_Intel</dc:creator>
      <dc:date>2017-02-16T00:46:31Z</dc:date>
    </item>
  </channel>
</rss>

