<?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 Linking gcc with MKL in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-gcc-with-MKL/m-p/1121280#M24967</link>
    <description>&lt;DIV class="forum-post-wrapper1 D8CommentContainer row-with-author-and-content" style="width: 841.333px; border: 0px; padding-bottom: 0px; margin-top: 0px; margin-bottom: 0px; display: table-row; font-size: 13.008px;"&gt;
	&lt;DIV class="forum-post-panel-main1 clearfix D8Comment content-pane" style="float: none; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; width: 780px; max-width: 760px; display: table-cell;"&gt;
		&lt;DIV class="forum-post-content"&gt;
			&lt;DIV class="field field-name-comment-body field-type-text-long field-label-hidden"&gt;
				&lt;DIV class="field-items"&gt;
					&lt;DIV class="field-item even" property="content:encoded"&gt;
						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;&amp;nbsp;have a sample C program that makes use of trigonometric functions. I want to compile it using GCC 6.2.0.&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;On using the following command,&amp;nbsp;&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;gcc -liomp5 -lmkl_core -lmkl_intel_thread -lmkl_intel_lp64 example_tignometry.c&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;I get,&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;example_tignometry.c:(.text+0x35): undefined reference to `sin'&lt;BR /&gt;
							example_tignometry.c:(.text+0x48): undefined reference to `cos'&lt;BR /&gt;
							example_tignometry.c:(.text+0x5b): undefined reference to `tan'&lt;BR /&gt;
							example_tignometry.c:(.text+0x6e): undefined reference to `sinh'&lt;BR /&gt;
							example_tignometry.c:(.text+0x81): undefined reference to `cosh'&lt;BR /&gt;
							example_tignometry.c:(.text+0x94): undefined reference to `tanh'&lt;BR /&gt;
							example_tignometry.c:(.text+0xa7): undefined reference to `log'&lt;BR /&gt;
							example_tignometry.c:(.text+0xba): undefined reference to `log10'&lt;BR /&gt;
							example_tignometry.c:(.text+0xcd): undefined reference to `exp'&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;The contents of example_tignometry.c are&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;
							#include &amp;lt;math.h&amp;gt;&lt;BR /&gt;
							int main(){&lt;BR /&gt;
							float i = 0.314;&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float j = 0.25;&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float k = 6.25;&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float sin_value = sin(i);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float cos_value = cos(i);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float tan_value = tan(i);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float sinh_value = sinh(j);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float cosh_value = cosh(j);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float tanh_value = tanh(j);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float log_value = log(k);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float log10_value = log10(k);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float exp_value = exp(k);&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of sin(%f) : %f \n", i, sin_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of cos(%f) : %f \n", i, cos_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of tan(%f) : %f \n", i, tan_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of sinh(%f) : %f \n", j, sinh_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of cosh(%f) : %f \n", j, cosh_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of tanh(%f) : %f \n", j, tanh_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of log(%f) : %f \n", k, log_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of log10(%f) : %f \n",k,log10_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of exp(%f) : %f \n",k, exp_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 0;&lt;BR /&gt;
							}&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;Note: The operating system used is Ubuntu 14.04&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;&amp;nbsp;&lt;/P&gt;
					&lt;/DIV&gt;
				&lt;/DIV&gt;
			&lt;/DIV&gt;
		&lt;/DIV&gt;
	&lt;/DIV&gt;
&lt;/DIV&gt;

&lt;DIV class="forum-post-footer clearfix" style="margin-top: 0px; clear: both; border-bottom: 1px solid rgb(153, 153, 153); padding-bottom: 10px; font-size: 13.008px;"&gt;
	&lt;DIV class="forum-jump-links" style="float: right; text-align: right; margin: 10px 16px 0px 0px; font-size: 11px;"&gt;&lt;A class="af-button-small" href="https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/657544#" style="float: right;" title="Jump to top of page"&gt;Top&lt;/A&gt;&lt;/DIV&gt;

	&lt;DIV class="forum-post-links" style="float: left; text-align: right; margin: 5px 0px 5px 5px; font-size: 11px; padding-left: 90px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 22 Dec 2016 11:22:51 GMT</pubDate>
    <dc:creator>Joseph_A_</dc:creator>
    <dc:date>2016-12-22T11:22:51Z</dc:date>
    <item>
      <title>Linking gcc with MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-gcc-with-MKL/m-p/1121280#M24967</link>
      <description>&lt;DIV class="forum-post-wrapper1 D8CommentContainer row-with-author-and-content" style="width: 841.333px; border: 0px; padding-bottom: 0px; margin-top: 0px; margin-bottom: 0px; display: table-row; font-size: 13.008px;"&gt;
	&lt;DIV class="forum-post-panel-main1 clearfix D8Comment content-pane" style="float: none; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; width: 780px; max-width: 760px; display: table-cell;"&gt;
		&lt;DIV class="forum-post-content"&gt;
			&lt;DIV class="field field-name-comment-body field-type-text-long field-label-hidden"&gt;
				&lt;DIV class="field-items"&gt;
					&lt;DIV class="field-item even" property="content:encoded"&gt;
						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;&amp;nbsp;have a sample C program that makes use of trigonometric functions. I want to compile it using GCC 6.2.0.&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;On using the following command,&amp;nbsp;&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;gcc -liomp5 -lmkl_core -lmkl_intel_thread -lmkl_intel_lp64 example_tignometry.c&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;I get,&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;example_tignometry.c:(.text+0x35): undefined reference to `sin'&lt;BR /&gt;
							example_tignometry.c:(.text+0x48): undefined reference to `cos'&lt;BR /&gt;
							example_tignometry.c:(.text+0x5b): undefined reference to `tan'&lt;BR /&gt;
							example_tignometry.c:(.text+0x6e): undefined reference to `sinh'&lt;BR /&gt;
							example_tignometry.c:(.text+0x81): undefined reference to `cosh'&lt;BR /&gt;
							example_tignometry.c:(.text+0x94): undefined reference to `tanh'&lt;BR /&gt;
							example_tignometry.c:(.text+0xa7): undefined reference to `log'&lt;BR /&gt;
							example_tignometry.c:(.text+0xba): undefined reference to `log10'&lt;BR /&gt;
							example_tignometry.c:(.text+0xcd): undefined reference to `exp'&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;The contents of example_tignometry.c are&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;
							#include &amp;lt;math.h&amp;gt;&lt;BR /&gt;
							int main(){&lt;BR /&gt;
							float i = 0.314;&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float j = 0.25;&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float k = 6.25;&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float sin_value = sin(i);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float cos_value = cos(i);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float tan_value = tan(i);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float sinh_value = sinh(j);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float cosh_value = cosh(j);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float tanh_value = tanh(j);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float log_value = log(k);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float log10_value = log10(k);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float exp_value = exp(k);&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of sin(%f) : %f \n", i, sin_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of cos(%f) : %f \n", i, cos_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of tan(%f) : %f \n", i, tan_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of sinh(%f) : %f \n", j, sinh_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of cosh(%f) : %f \n", j, cosh_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of tanh(%f) : %f \n", j, tanh_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of log(%f) : %f \n", k, log_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of log10(%f) : %f \n",k,log10_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of exp(%f) : %f \n",k, exp_value);&lt;BR /&gt;
							&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 0;&lt;BR /&gt;
							}&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;Note: The operating system used is Ubuntu 14.04&lt;/P&gt;

						&lt;P style="word-wrap: break-word; margin-bottom: 1.5em;"&gt;&amp;nbsp;&lt;/P&gt;
					&lt;/DIV&gt;
				&lt;/DIV&gt;
			&lt;/DIV&gt;
		&lt;/DIV&gt;
	&lt;/DIV&gt;
&lt;/DIV&gt;

&lt;DIV class="forum-post-footer clearfix" style="margin-top: 0px; clear: both; border-bottom: 1px solid rgb(153, 153, 153); padding-bottom: 10px; font-size: 13.008px;"&gt;
	&lt;DIV class="forum-jump-links" style="float: right; text-align: right; margin: 10px 16px 0px 0px; font-size: 11px;"&gt;&lt;A class="af-button-small" href="https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/657544#" style="float: right;" title="Jump to top of page"&gt;Top&lt;/A&gt;&lt;/DIV&gt;

	&lt;DIV class="forum-post-links" style="float: left; text-align: right; margin: 5px 0px 5px 5px; font-size: 11px; padding-left: 90px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 22 Dec 2016 11:22:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-gcc-with-MKL/m-p/1121280#M24967</guid>
      <dc:creator>Joseph_A_</dc:creator>
      <dc:date>2016-12-22T11:22:51Z</dc:date>
    </item>
    <item>
      <title>Joseph, pls have a look what</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-gcc-with-MKL/m-p/1121281#M24968</link>
      <description>&lt;P&gt;Joseph, pls have a look what &lt;A href="https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor"&gt;MKL Linker&lt;/A&gt; suggest in that case and try again.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 16:40:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-gcc-with-MKL/m-p/1121281#M24968</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2016-12-22T16:40:55Z</dc:date>
    </item>
  </channel>
</rss>

