<?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 Hi Francis,  in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-option-for-including-mkl-libraries-statically/m-p/929202#M13613</link>
    <description>Hi Francis, 

Yes, I can understand your request, we have same discussion in &lt;A href="http://software.intel.com/en-us/articles/intel-math-kernel-library-for-mac-os-compiling-and-linking-with-xcode" target="_blank"&gt;http://software.intel.com/en-us/articles/intel-math-kernel-library-for-mac-os-compiling-and-linking-with-xcode&lt;/A&gt;. 

Like under windows, if your project was setting /MT (static link), then we can link static MKL automatically.  and under Linux -Bstatic -lmkl, link static MKL automatically too.
but it seems a limitation by compiler and linker on Mac OS.  They don't support -Bstatic option.   

Acutally,the option 2 seems the easy workaround so far.  as you want to static link mkl, then the fixed path is only used one time.  Once you set a valid path during development, then no more environment dependency. 

Best Regards, 
Ying</description>
    <pubDate>Wed, 24 Oct 2012 05:37:35 GMT</pubDate>
    <dc:creator>Ying_H_Intel</dc:creator>
    <dc:date>2012-10-24T05:37:35Z</dc:date>
    <item>
      <title>Linking option for including mkl libraries statically.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-option-for-including-mkl-libraries-statically/m-p/929201#M13612</link>
      <description>&lt;P&gt;Trying to build my binary by including the intel MKL libraries statically (on OS X).&lt;/P&gt;
&lt;P&gt;I have explored the following options:&lt;/P&gt;
&lt;P&gt;[1] using&amp;nbsp;-lmkl_intel_ilp64, etc at the link stage but this dynamically links the libraries despite the .dylib's and .a's existing under&amp;nbsp;/opt/intel/composer_xe_2013.0.088/mkl/lib. &amp;nbsp;The top rated answer on&amp;nbsp;http://stackoverflow.com/questions/844819/how-to-static-link-on-os-x shows that in cases where the .dylib and .a appear in the same directory, the .dylib (shared linking) is used.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[2] Manually adding the full paths to the MKL libraries to the link line. &amp;nbsp;I would not have to rely on fixed paths as I'm developing a cross platform application.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to use option [1] as its environment agnostic, but not have to physically remove/relocate the .dylib's so that the linker will be forced to use the static version.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2012 19:26:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-option-for-including-mkl-libraries-statically/m-p/929201#M13612</guid>
      <dc:creator>Francis_R_2</dc:creator>
      <dc:date>2012-10-18T19:26:49Z</dc:date>
    </item>
    <item>
      <title>Hi Francis,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-option-for-including-mkl-libraries-statically/m-p/929202#M13613</link>
      <description>Hi Francis, 

Yes, I can understand your request, we have same discussion in &lt;A href="http://software.intel.com/en-us/articles/intel-math-kernel-library-for-mac-os-compiling-and-linking-with-xcode" target="_blank"&gt;http://software.intel.com/en-us/articles/intel-math-kernel-library-for-mac-os-compiling-and-linking-with-xcode&lt;/A&gt;. 

Like under windows, if your project was setting /MT (static link), then we can link static MKL automatically.  and under Linux -Bstatic -lmkl, link static MKL automatically too.
but it seems a limitation by compiler and linker on Mac OS.  They don't support -Bstatic option.   

Acutally,the option 2 seems the easy workaround so far.  as you want to static link mkl, then the fixed path is only used one time.  Once you set a valid path during development, then no more environment dependency. 

Best Regards, 
Ying</description>
      <pubDate>Wed, 24 Oct 2012 05:37:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-option-for-including-mkl-libraries-statically/m-p/929202#M13613</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2012-10-24T05:37:35Z</dc:date>
    </item>
  </channel>
</rss>

