<?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 Error LNK2019 when using Fortran Intrinsic Functions in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827368#M50737</link>
    <description>I am not getting any warnings when I compile the Fortran static library. I just get these two errors in the C++ project:&lt;BR /&gt;&lt;BR /&gt;error LNK2019: unresolved external symbol _SQRT referenced in function &lt;P style="text-align: left;"&gt;error LNK1120: 1 unresolved externals&lt;BR /&gt;&lt;BR /&gt;However, if I make a Fortran dynamic-link library, I receive these errors during the Fortran compilation instead of the C++ compilation. &lt;/P&gt;</description>
    <pubDate>Thu, 10 May 2012 17:59:26 GMT</pubDate>
    <dc:creator>lls121</dc:creator>
    <dc:date>2012-05-10T17:59:26Z</dc:date>
    <item>
      <title>Error LNK2019 when using Fortran Intrinsic Functions</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827362#M50731</link>
      <description>&lt;P&gt;I just started using Intel Visual Fortran Compiler for Windows, and I am trying to set up a solution in Visual Studio 2010 that contains a Fortran Static Library project and a C++ project. I can access my Fortran subroutines and functions through the C++ project without any issues, but when I include any Fortran intrinsic functions in my Fortran code, I get a LNK2019 error. &lt;BR /&gt;&lt;BR /&gt;For example, I created a Fortran function, FR,that calls the SQRT function. The Fortran project builds fine, but when I callFRin my C++ code, I get an &lt;EM&gt;error LNK2019: unresolved external symbol _SQRT referenced in function _FR. &lt;/EM&gt;What do I need to include in my project so that I can use these functions?&lt;BR /&gt;&lt;BR /&gt;Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2012 13:52:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827362#M50731</guid>
      <dc:creator>lls121</dc:creator>
      <dc:date>2012-05-10T13:52:24Z</dc:date>
    </item>
    <item>
      <title>Error LNK2019 when using Fortran Intrinsic Functions</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827363#M50732</link>
      <description>The C/C++ compiler driver is treating the .OBJ files that the Fortran produced as if they were also C/C++ compiler-produced.&lt;BR /&gt;&lt;BR /&gt;You may specify the appropriate Fortran library that contains the intrinsic functions to be used when linking.</description>
      <pubDate>Thu, 10 May 2012 14:20:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827363#M50732</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-05-10T14:20:26Z</dc:date>
    </item>
    <item>
      <title>Error LNK2019 when using Fortran Intrinsic Functions</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827364#M50733</link>
      <description>Thanks for the response, mecej4. Could you be a little more specific regarding how to do this? Where would I specify the appropriate Fortran library within Visual Studio 2010?</description>
      <pubDate>Thu, 10 May 2012 14:37:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827364#M50733</guid>
      <dc:creator>lls121</dc:creator>
      <dc:date>2012-05-10T14:37:35Z</dc:date>
    </item>
    <item>
      <title>Error LNK2019 when using Fortran Intrinsic Functions</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827365#M50734</link>
      <description>Please read &lt;A href="http://software.intel.com/en-us/articles/configuring-visual-studio-for-mixed-language-applications"&gt;Configuring Visual Studio for Mixed Language Applications&lt;/A&gt;</description>
      <pubDate>Thu, 10 May 2012 14:44:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827365#M50734</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-05-10T14:44:57Z</dc:date>
    </item>
    <item>
      <title>Error LNK2019 when using Fortran Intrinsic Functions</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827366#M50735</link>
      <description>Hi Steve,&lt;BR /&gt;&lt;BR /&gt;I have followed these instructions, but I still get this error. Any ideas?</description>
      <pubDate>Thu, 10 May 2012 15:54:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827366#M50735</guid>
      <dc:creator>lls121</dc:creator>
      <dc:date>2012-05-10T15:54:35Z</dc:date>
    </item>
    <item>
      <title>Error LNK2019 when using Fortran Intrinsic Functions</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827367#M50736</link>
      <description>Are you getting any warnings during the Fortran compilation? That you get a reference to _SQRT suggests to me that you're also seeing a warning that the arguments to an intrinsic don't match a supported signature and hence an external reference is used.</description>
      <pubDate>Thu, 10 May 2012 17:35:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827367#M50736</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-05-10T17:35:21Z</dc:date>
    </item>
    <item>
      <title>Error LNK2019 when using Fortran Intrinsic Functions</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827368#M50737</link>
      <description>I am not getting any warnings when I compile the Fortran static library. I just get these two errors in the C++ project:&lt;BR /&gt;&lt;BR /&gt;error LNK2019: unresolved external symbol _SQRT referenced in function &lt;P style="text-align: left;"&gt;error LNK1120: 1 unresolved externals&lt;BR /&gt;&lt;BR /&gt;However, if I make a Fortran dynamic-link library, I receive these errors during the Fortran compilation instead of the C++ compilation. &lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2012 17:59:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827368#M50737</guid>
      <dc:creator>lls121</dc:creator>
      <dc:date>2012-05-10T17:59:26Z</dc:date>
    </item>
    <item>
      <title>Error LNK2019 when using Fortran Intrinsic Functions</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827369#M50738</link>
      <description>Would you please attach the Fortran project, including sources, as a ZIP file? Or at least a sample project that shows this error?</description>
      <pubDate>Thu, 10 May 2012 18:09:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827369#M50738</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-05-10T18:09:07Z</dc:date>
    </item>
    <item>
      <title>Error LNK2019 when using Fortran Intrinsic Functions</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827370#M50739</link>
      <description>I have attached my project. Thanks again for the help. I really appreciate it.&lt;BR /&gt;&lt;BR /&gt;I am completely new to Fortran, so it could easily be a programming issue.</description>
      <pubDate>Thu, 10 May 2012 18:36:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827370#M50739</guid>
      <dc:creator>lls121</dc:creator>
      <dc:date>2012-05-10T18:36:31Z</dc:date>
    </item>
    <item>
      <title>Error LNK2019 when using Fortran Intrinsic Functions</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827371#M50740</link>
      <description>So you didn't see this warning?&lt;BR /&gt;&lt;BR /&gt;FortranTest\FortranTest\test.f(11): warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [SQRT]&lt;BR /&gt;&lt;BR /&gt;In subroutine FSROOT, you have a call to SQRT(N). N is not declared, so, by the rules of Fortran, it is implicitly INTEGER. (Variables starting with I through N are integer, all others are real. Hence the Fortran joke: "God is real, unless declared integer.")&lt;BR /&gt;&lt;BR /&gt;SQRT is not defined for the integer type, so you get the warning. The compiler then assumes you mean some external routine SQRT which you didn't provide.&lt;BR /&gt;&lt;BR /&gt;Assuming that you want to take the square root of the value of N, you will have to write it as:&lt;BR /&gt;&lt;BR /&gt;FSROOT = SQRT(REAL(N))&lt;BR /&gt;&lt;BR /&gt;The REAL() intrinsic converts the argument to the REAL datatype.&lt;BR /&gt;&lt;BR /&gt;By the way, at least in this example, you don't need the ATTRIBUTES DLLEXPORT as you are building a static library. It does no harm.</description>
      <pubDate>Thu, 10 May 2012 20:36:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827371#M50740</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-05-10T20:36:25Z</dc:date>
    </item>
    <item>
      <title>Error LNK2019 when using Fortran Intrinsic Functions</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827372#M50741</link>
      <description>Thanks for the help Steve!</description>
      <pubDate>Fri, 11 May 2012 11:28:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-LNK2019-when-using-Fortran-Intrinsic-Functions/m-p/827372#M50741</guid>
      <dc:creator>lls121</dc:creator>
      <dc:date>2012-05-11T11:28:04Z</dc:date>
    </item>
  </channel>
</rss>

