<?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 Concerning custom dll static linking, dll called from C# side  in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Concerning-custom-dll-static-linking-dll-called-from-C-side/m-p/1122110#M25027</link>
    <description>&lt;P&gt;Good Day!&lt;/P&gt;

&lt;P&gt;I ve installed Intel MKL 11.3 and all C/C++ colsole application samples are firing. I also have working mixed (unmanaged/managed ) application where i try to improve performance using Intel MKL. So normally managed application is calling unmanaged functions by Platform Invoke methods. Nothing unusual.&lt;/P&gt;

&lt;P&gt;Problems begin with my custom dll calls Intel MKL, libintel64 and 2&lt;SUP&gt;nd &lt;/SUP&gt;C# example.&lt;/P&gt;

&lt;P&gt;I ve setup up environement as described in Getting Started guides, articles, MS VS Studio C/C++ linking tutrorial. I ve ran "mklvars.bat intel64".&lt;/P&gt;

&lt;OL&gt;
	&lt;LI&gt;If I compile with static linking to mkl_intel_lp64_dll.lib mkl_core_dll.lib mkl_intel_thread_dll.lib libiomp5md.lib linker cant find files. If I leave only libiomp5md.lib – it is found. Same with libintel64 prototype example.&lt;/LI&gt;
	&lt;LI&gt;If I compile without static linking to mkl_intel_lp64_dll.lib mkl_core_dll.lib mkl_intel_thread_dll.lib libiomp5md.lib – custom dll is created but problems begin later.&lt;/LI&gt;
	&lt;LI&gt;If I create my custom DLL without static linking to intel mkl libs – it compiles, when I call it from C# app – not found exception occurs. Ok I copy then mkl_core_dll.dll mkl_intel_thread_dll.dll libiomp5md.dll to C# assembly directory. App looks starting well but on second call of my custom dll function I receive error: not found entry point. If I rebuild my custom dll without Intel MKL – everything fires with my default functions.&lt;/LI&gt;
	&lt;LI&gt;First C# turorial example fires. Second C# tutorial shows it cant find mkl_intel_lp64_dll.lib and example shuts down with dll not found exception.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Seems I have tried all kind of settings, including paths etc, i copied them directly from directory paths, I ve ran mklvars.bat with IA32 and Intel64 variants.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I also tried switch on/off enums in Intel MKL settings in project properties. Nothings helps.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;So need assistance.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Alexey&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 10 Jul 2016 12:24:56 GMT</pubDate>
    <dc:creator>alexey_k_2</dc:creator>
    <dc:date>2016-07-10T12:24:56Z</dc:date>
    <item>
      <title>Concerning custom dll static linking, dll called from C# side</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Concerning-custom-dll-static-linking-dll-called-from-C-side/m-p/1122110#M25027</link>
      <description>&lt;P&gt;Good Day!&lt;/P&gt;

&lt;P&gt;I ve installed Intel MKL 11.3 and all C/C++ colsole application samples are firing. I also have working mixed (unmanaged/managed ) application where i try to improve performance using Intel MKL. So normally managed application is calling unmanaged functions by Platform Invoke methods. Nothing unusual.&lt;/P&gt;

&lt;P&gt;Problems begin with my custom dll calls Intel MKL, libintel64 and 2&lt;SUP&gt;nd &lt;/SUP&gt;C# example.&lt;/P&gt;

&lt;P&gt;I ve setup up environement as described in Getting Started guides, articles, MS VS Studio C/C++ linking tutrorial. I ve ran "mklvars.bat intel64".&lt;/P&gt;

&lt;OL&gt;
	&lt;LI&gt;If I compile with static linking to mkl_intel_lp64_dll.lib mkl_core_dll.lib mkl_intel_thread_dll.lib libiomp5md.lib linker cant find files. If I leave only libiomp5md.lib – it is found. Same with libintel64 prototype example.&lt;/LI&gt;
	&lt;LI&gt;If I compile without static linking to mkl_intel_lp64_dll.lib mkl_core_dll.lib mkl_intel_thread_dll.lib libiomp5md.lib – custom dll is created but problems begin later.&lt;/LI&gt;
	&lt;LI&gt;If I create my custom DLL without static linking to intel mkl libs – it compiles, when I call it from C# app – not found exception occurs. Ok I copy then mkl_core_dll.dll mkl_intel_thread_dll.dll libiomp5md.dll to C# assembly directory. App looks starting well but on second call of my custom dll function I receive error: not found entry point. If I rebuild my custom dll without Intel MKL – everything fires with my default functions.&lt;/LI&gt;
	&lt;LI&gt;First C# turorial example fires. Second C# tutorial shows it cant find mkl_intel_lp64_dll.lib and example shuts down with dll not found exception.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Seems I have tried all kind of settings, including paths etc, i copied them directly from directory paths, I ve ran mklvars.bat with IA32 and Intel64 variants.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I also tried switch on/off enums in Intel MKL settings in project properties. Nothings helps.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;So need assistance.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Alexey&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jul 2016 12:24:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Concerning-custom-dll-static-linking-dll-called-from-C-side/m-p/1122110#M25027</guid>
      <dc:creator>alexey_k_2</dc:creator>
      <dc:date>2016-07-10T12:24:56Z</dc:date>
    </item>
    <item>
      <title>Hi alexey, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Concerning-custom-dll-static-linking-dll-called-from-C-side/m-p/1122111#M25028</link>
      <description>&lt;P&gt;Hi alexey,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I am afraid the way of linking MKL in C# code is different from the way of using MKL in C/C++ program. Here's an article for&lt;A href="https://software.intel.com/en-us/articles/some-more-additional-tips-how-to-call-mkl-from-your-c-code"&gt; using the Intel MKL in C# code&lt;/A&gt;, please follow it to run the batch file setting environment variables. It is unnecessary to link libraries in visual studio manually. And by the way, the&amp;nbsp;&lt;SPAN style="color: rgb(96, 96, 96); font-size: 13.008px; line-height: 19.512px;"&gt;mkl_intel_lp64_dll.lib,&amp;nbsp;mkl_core_dll.lib, and&amp;nbsp;mkl_intel_thread_dll.lib are &lt;A href="https://software.intel.com/en-us/node/528487"&gt;dynamic libraries in lib\intel64_win Directory&lt;/A&gt;. Hope it could help you.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(96, 96, 96); font-size: 13.008px; line-height: 19.512px;"&gt;Useful link:&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program"&gt;Using Intel® MKL in your C# program&lt;/A&gt;,&amp;nbsp;&lt;A href="https://software.intel.com/en-us/articles/some-more-additional-tips-how-to-call-mkl-from-your-c-code"&gt;Some more additional tips "How to call MKL from your C# code"&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 03:12:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Concerning-custom-dll-static-linking-dll-called-from-C-side/m-p/1122111#M25028</guid>
      <dc:creator>Zhen_Z_Intel</dc:creator>
      <dc:date>2016-07-11T03:12:44Z</dc:date>
    </item>
  </channel>
</rss>

