<?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 Get an example function working in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Get-an-example-function-working/m-p/865995#M7991</link>
    <description>&lt;P&gt;Todd,&lt;BR /&gt;&lt;BR /&gt;Thank u for ur response.&lt;BR /&gt;I could not get the above code to work, by the way its in Visual Studio 2008, I then decided to change a bit and try the below one:&lt;BR /&gt;&lt;BR /&gt;#include "mkl.h"&lt;BR /&gt;extern "C" float sdot(const MKL_INT *n, const float *x, const MKL_INT *incx, const float *y, const MKL_INT *incy);&lt;/P&gt;
&lt;P&gt;#define N 5&lt;/P&gt;
&lt;P&gt;void test1()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;MKL_INT n, inca = 1, incb = 1, i;&lt;/P&gt;
&lt;P&gt;const float a&lt;N&gt; = {1, 2, 3, 4, 5}, b&lt;N&gt; = {6, 7, 8, 9, 10};&lt;/N&gt;&lt;/N&gt;&lt;/P&gt;
&lt;P&gt;n = N;&lt;/P&gt;
&lt;P&gt;sdot(&amp;amp;n, a, &amp;amp;inca, b, &amp;amp;incb);&lt;BR /&gt;printf( "The dot product is: ( %6.2f, %6.2f) ", n );&lt;/P&gt;
&lt;P&gt;}&lt;BR /&gt;&lt;BR /&gt;The error msg I get is:&lt;/P&gt;
&lt;P&gt;mkl_intel_c.lib(_sdot.obj) : error LNK2019: unresolved external symbol _mkl_blas_sdot referenced in function _sdot&lt;/P&gt;
&lt;P&gt;1&amp;gt;Release/XLStats.xll : fatal error LNK1120: 1 unresolved externals&lt;BR /&gt;&lt;BR /&gt;Does anyboduy have an idea about how to fix it?&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Mar 2010 11:00:32 GMT</pubDate>
    <dc:creator>Erasmo_Coletti</dc:creator>
    <dc:date>2010-03-22T11:00:32Z</dc:date>
    <item>
      <title>Get an example function working</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Get-an-example-function-working/m-p/865993#M7989</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I just loaded the Intel MKL library andI am trying to make an example work in C++. I copied the example from the web. The code I copied is as below:&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;//Example 2: Calling a Complex BLAS Level 1 Function from C++&lt;/P&gt;
&lt;P&gt;#include "mkl.h"&lt;BR /&gt;typedef struct{ double re; double im; } complex16;&lt;/P&gt;
&lt;P&gt;extern "C" void zdotc (complex16*, int *, complex16 *, int *, complex16 *, int *);&lt;/P&gt;
&lt;P&gt;#define N 5&lt;/P&gt;
&lt;P&gt;void test1()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;int n, inca = 1, incb = 1, i;&lt;/P&gt;
&lt;P&gt;complex16 a&lt;N&gt;, b&lt;N&gt;, c;&lt;/N&gt;&lt;/N&gt;&lt;/P&gt;
&lt;P&gt;n = N;&lt;/P&gt;
&lt;P&gt;for( i = 0; i &amp;lt; n; i++ ){&lt;/P&gt;
&lt;P&gt;a&lt;I&gt;.re = (double)i; a&lt;I&gt;.im = (double)i * 2.0;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;b&lt;I&gt;.re = (double)(n - i); b&lt;I&gt;.im = (double)i * 2.0;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;zdotc(&amp;amp;c, &amp;amp;n, a, &amp;amp;inca, b, &amp;amp;incb );&lt;/P&gt;
&lt;P&gt;printf( "The complex dot product is: ( %6.2f, %6.2f) ", c.re, c.im );&lt;/P&gt;
&lt;P&gt;}&lt;BR /&gt;&lt;BR /&gt;I get as an error : second C linkage of overloaded function 'zdotc' not allowed&lt;BR /&gt;&lt;BR /&gt;Can somebody tell me/help me about why the above is not working?&lt;BR /&gt;&lt;BR /&gt;Thank you for your help.&lt;BR /&gt;&lt;BR /&gt;E.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2010 17:29:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Get-an-example-function-working/m-p/865993#M7989</guid>
      <dc:creator>Erasmo_Coletti</dc:creator>
      <dc:date>2010-03-19T17:29:59Z</dc:date>
    </item>
    <item>
      <title>Get an example function working</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Get-an-example-function-working/m-p/865994#M7990</link>
      <description>Could it be because the MKL header file already has the zdotc prototype and you define it again (slightly differently) in your example source? If you look in mkl_blas.h you'll see the following prototype:&lt;BR /&gt;&lt;BR /&gt;void zdotc(MKL_Complex16 *pres, const MKL_INT *n, const MKL_Complex16 *x, const MKL_INT *incx, const MKL_Complex16 *y, const MKL_INT *incy);&lt;BR /&gt;&lt;BR /&gt;Todd</description>
      <pubDate>Sat, 20 Mar 2010 00:09:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Get-an-example-function-working/m-p/865994#M7990</guid>
      <dc:creator>Todd_R_Intel</dc:creator>
      <dc:date>2010-03-20T00:09:21Z</dc:date>
    </item>
    <item>
      <title>Get an example function working</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Get-an-example-function-working/m-p/865995#M7991</link>
      <description>&lt;P&gt;Todd,&lt;BR /&gt;&lt;BR /&gt;Thank u for ur response.&lt;BR /&gt;I could not get the above code to work, by the way its in Visual Studio 2008, I then decided to change a bit and try the below one:&lt;BR /&gt;&lt;BR /&gt;#include "mkl.h"&lt;BR /&gt;extern "C" float sdot(const MKL_INT *n, const float *x, const MKL_INT *incx, const float *y, const MKL_INT *incy);&lt;/P&gt;
&lt;P&gt;#define N 5&lt;/P&gt;
&lt;P&gt;void test1()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;MKL_INT n, inca = 1, incb = 1, i;&lt;/P&gt;
&lt;P&gt;const float a&lt;N&gt; = {1, 2, 3, 4, 5}, b&lt;N&gt; = {6, 7, 8, 9, 10};&lt;/N&gt;&lt;/N&gt;&lt;/P&gt;
&lt;P&gt;n = N;&lt;/P&gt;
&lt;P&gt;sdot(&amp;amp;n, a, &amp;amp;inca, b, &amp;amp;incb);&lt;BR /&gt;printf( "The dot product is: ( %6.2f, %6.2f) ", n );&lt;/P&gt;
&lt;P&gt;}&lt;BR /&gt;&lt;BR /&gt;The error msg I get is:&lt;/P&gt;
&lt;P&gt;mkl_intel_c.lib(_sdot.obj) : error LNK2019: unresolved external symbol _mkl_blas_sdot referenced in function _sdot&lt;/P&gt;
&lt;P&gt;1&amp;gt;Release/XLStats.xll : fatal error LNK1120: 1 unresolved externals&lt;BR /&gt;&lt;BR /&gt;Does anyboduy have an idea about how to fix it?&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2010 11:00:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Get-an-example-function-working/m-p/865995#M7991</guid>
      <dc:creator>Erasmo_Coletti</dc:creator>
      <dc:date>2010-03-22T11:00:32Z</dc:date>
    </item>
    <item>
      <title>Get an example function working</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Get-an-example-function-working/m-p/865996#M7992</link>
      <description>please add the required libraries to the Configuration Properties:
&lt;DIV&gt;Linker\Input\Additional Dependencies:mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;as well add the path to the directory&lt;/DIV&gt;
&lt;DIV&gt;Linker\General\Additional Libraries Directory:&lt;MKLROOT&gt;\ia32\lib\&lt;/MKLROOT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;where &lt;MKLROOT&gt;, as an example ==C:\Apps\Intel\MKL\10.2.4\ia32\lib\&lt;/MKLROOT&gt;&lt;/DIV&gt;
&lt;DIV&gt;--Gennady&lt;/DIV&gt;</description>
      <pubDate>Tue, 23 Mar 2010 15:18:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Get-an-example-function-working/m-p/865996#M7992</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2010-03-23T15:18:29Z</dc:date>
    </item>
  </channel>
</rss>

