<?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 Static Linking MKL in Visual Studio 2010 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771510#M649</link>
    <description>Continued, &lt;BR /&gt;&lt;BR /&gt;The two kind of methods are equivalent in most of cases .so it is enough for select one of method. But in caseof you use themat the same time, the 2) has priority. &lt;BR /&gt;&lt;BR /&gt;So that is why even if you link the static library manually, the project always ignore them. &lt;BR /&gt;&lt;BR /&gt;Then let's talking about 2), why it link dynamic library.&lt;BR /&gt;&lt;BR /&gt;Actually, the linked library is based on your choise of Run -time library (/MD multi-threaded dll, /MT Multi-thread (static). you can check the option in c/C++=&amp;gt;code generation =&amp;gt;Runtime library)&lt;BR /&gt;&lt;BR /&gt;if it is /MD, then the mkl integration option will use dynamic library &lt;BR /&gt;if it is /MT , then the mkl integration option will use static library. &lt;BR /&gt;&lt;BR /&gt;The option in your project is /MD, so mkl dynamic library are linked always. &lt;BR /&gt;&lt;BR /&gt;Then for the solution, it should ok if you change the /MD to /MT for simple project.But as your application is based MFC dll and other third-party dll, your project will have to ask /MD option. &lt;BR /&gt;&lt;BR /&gt;In such case, the bettersolutionlooks that to turn back manual link.&lt;BR /&gt;&lt;BR /&gt; Please disable the option of method 2). (keep it as NO)&lt;BR /&gt;then add the header file path and library path manually as 1.1) and 1.2). &lt;BR /&gt;&lt;BR /&gt;One more notes, the linked library : mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib (openMP library is needed and dynamic is recommend, so your dll may still depend on the libiomp5md.dll library) &lt;BR /&gt;&lt;BR /&gt;Please try it and let us know if any result. &lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Ying</description>
    <pubDate>Thu, 09 Aug 2012 09:04:28 GMT</pubDate>
    <dc:creator>Ying_H_Intel</dc:creator>
    <dc:date>2012-08-09T09:04:28Z</dc:date>
    <item>
      <title>Static Linking MKL in Visual Studio 2010</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771505#M644</link>
      <description>Hello Anyone,&lt;BR /&gt;&lt;BR /&gt;I'm using Visual Studio 2010 C++ w/ Intel Composer XE 12.1 to build a64-bit dll that incorporates calls to theMKL (10.3.11). For simplicity of deployment, I want to statically link inas many of the mkl libraries as possible.Based on output from thelink line advisor I've added mkl_intel_lp64.lib; mkl_intel_thread.lib; mkl_core.lib to the link line. However, no matter what I do, the libraries are not being statically linked. The linker insists on using the *_dll.lib versions.&lt;BR /&gt;&lt;BR /&gt;What do I need to do to force Visual Studio / xilink to statically link this thing?&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Michael</description>
      <pubDate>Wed, 08 Aug 2012 01:07:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771505#M644</guid>
      <dc:creator>mkfreytag</dc:creator>
      <dc:date>2012-08-08T01:07:33Z</dc:date>
    </item>
    <item>
      <title>Static Linking MKL in Visual Studio 2010</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771506#M645</link>
      <description>Hi Michael, &lt;BR /&gt;&lt;BR /&gt;Could you please attach the small project to us so we can see what is the problem?&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Ying</description>
      <pubDate>Wed, 08 Aug 2012 02:56:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771506#M645</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2012-08-08T02:56:20Z</dc:date>
    </item>
    <item>
      <title>Static Linking MKL in Visual Studio 2010</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771507#M646</link>
      <description>Hello Ying,&lt;BR /&gt;I sent you a PM.&lt;BR /&gt;Thank you,&lt;BR /&gt;Michael</description>
      <pubDate>Wed, 08 Aug 2012 15:11:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771507#M646</guid>
      <dc:creator>mkfreytag</dc:creator>
      <dc:date>2012-08-08T15:11:34Z</dc:date>
    </item>
    <item>
      <title>Static Linking MKL in Visual Studio 2010</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771508#M647</link>
      <description>Hi Michael, &lt;BR /&gt;&lt;BR /&gt;I sawyour message, but the attached file is not there. Could you please upload it again? (you can addthe file by the "Add Files" button onup windows of reply)&lt;BR /&gt;(for third party libary, you may package the needed libraries to the project,). &lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Ying&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Aug 2012 03:40:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771508#M647</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2012-08-09T03:40:23Z</dc:date>
    </item>
    <item>
      <title>Static Linking MKL in Visual Studio 2010</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771509#M648</link>
      <description>Hi Michael, &lt;BR /&gt;&lt;BR /&gt;Thanks for the project. It is helpful. Let's me try to explain the cause. &lt;BR /&gt;&lt;BR /&gt;There are two common ways to link MKL to an application. &lt;BR /&gt;&lt;BR /&gt;1) manually link&lt;BR /&gt;&lt;BR /&gt;It include 3 steps as the articl &lt;A href="http://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-compiling-and-linking-with-microsoft-visual-cc/"&gt;http://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-compiling-and-linking-with-microsoft-visual-cc/&lt;/A&gt;&lt;BR /&gt;in &lt;STRONG&gt;Project Properties&lt;/STRONG&gt;, Open the Propery Pages &lt;P&gt;1.1 Select the &lt;STRONG&gt;C/C++  General&lt;/STRONG&gt; tab, In the &lt;STRONG&gt;Additional Include Directories&lt;/STRONG&gt;line, add Intel MKL header filesinclude path (e.g. default: C:\Program Files\Intel\MKL\include). &lt;/P&gt;&lt;P&gt;1.2 Select the &lt;STRONG&gt;Link  General&lt;/STRONG&gt; tab, In the &lt;STRONG&gt;Additional Library Directoriesline&lt;/STRONG&gt;, add Intel MKL library filespath(e.g. default: C:\Program Files\Intel\MKL\lib\intel64) &lt;BR /&gt;1.3 , Select the &lt;STRONG&gt;Link Input&lt;/STRONG&gt; tab, In the &lt;STRONG&gt;AdditionalDependencies&lt;/STRONG&gt;,add the requiredMKL libraries(e.g. common link: mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib).based on link line advisor. &lt;BR /&gt;&lt;BR /&gt;As you see, you did the 3rd steps. &lt;BR /&gt;&lt;BR /&gt;2) uing mkl intergated option in MSVC 2010. For example, below option. &lt;BR /&gt;You have the option is on too. &lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.intel.com/skins/images/7B13F55A7CE623EF42E69096FA81A3A1/2021_redesign/images/image_not_found.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;I upload the message in case of the page time out. &lt;BR /&gt;</description>
      <pubDate>Thu, 09 Aug 2012 08:41:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771509#M648</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2012-08-09T08:41:39Z</dc:date>
    </item>
    <item>
      <title>Static Linking MKL in Visual Studio 2010</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771510#M649</link>
      <description>Continued, &lt;BR /&gt;&lt;BR /&gt;The two kind of methods are equivalent in most of cases .so it is enough for select one of method. But in caseof you use themat the same time, the 2) has priority. &lt;BR /&gt;&lt;BR /&gt;So that is why even if you link the static library manually, the project always ignore them. &lt;BR /&gt;&lt;BR /&gt;Then let's talking about 2), why it link dynamic library.&lt;BR /&gt;&lt;BR /&gt;Actually, the linked library is based on your choise of Run -time library (/MD multi-threaded dll, /MT Multi-thread (static). you can check the option in c/C++=&amp;gt;code generation =&amp;gt;Runtime library)&lt;BR /&gt;&lt;BR /&gt;if it is /MD, then the mkl integration option will use dynamic library &lt;BR /&gt;if it is /MT , then the mkl integration option will use static library. &lt;BR /&gt;&lt;BR /&gt;The option in your project is /MD, so mkl dynamic library are linked always. &lt;BR /&gt;&lt;BR /&gt;Then for the solution, it should ok if you change the /MD to /MT for simple project.But as your application is based MFC dll and other third-party dll, your project will have to ask /MD option. &lt;BR /&gt;&lt;BR /&gt;In such case, the bettersolutionlooks that to turn back manual link.&lt;BR /&gt;&lt;BR /&gt; Please disable the option of method 2). (keep it as NO)&lt;BR /&gt;then add the header file path and library path manually as 1.1) and 1.2). &lt;BR /&gt;&lt;BR /&gt;One more notes, the linked library : mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib (openMP library is needed and dynamic is recommend, so your dll may still depend on the libiomp5md.dll library) &lt;BR /&gt;&lt;BR /&gt;Please try it and let us know if any result. &lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Ying</description>
      <pubDate>Thu, 09 Aug 2012 09:04:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771510#M649</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2012-08-09T09:04:28Z</dc:date>
    </item>
    <item>
      <title>Static Linking MKL in Visual Studio 2010</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771511#M650</link>
      <description>Hello Ying,&lt;BR /&gt;Thank you for the details. I suspected that the /MD option might have been the problem, but Ididn't see a way to get aroundit. I'll implement your suggestions in the coming days and let you know how things turn out.&lt;BR /&gt;Thank you,&lt;BR /&gt;Michael</description>
      <pubDate>Fri, 10 Aug 2012 01:49:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-Linking-MKL-in-Visual-Studio-2010/m-p/771511#M650</guid>
      <dc:creator>mkfreytag</dc:creator>
      <dc:date>2012-08-10T01:49:48Z</dc:date>
    </item>
  </channel>
</rss>

