<?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 LNK2001 in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/LNK2001/m-p/967651#M23265</link>
    <description>I am trying to write a simple dll file which calls a routine from Nag's Fortran Library mark 17. Unfortunately I am not meeting with much success. My code is as follows: &lt;BR /&gt; &lt;BR /&gt; DOUBLE PRECISION FUNCTION TEST(X) &lt;BR /&gt;     ! Expose subroutine nagdll to users of this DLL &lt;BR /&gt;     ! &lt;BR /&gt;     !DEC$ ATTRIBUTES DLLEXPORT::TEST &lt;BR /&gt;*     .. Local Scalars .. &lt;BR /&gt;      DOUBLE PRECISION X &lt;BR /&gt;* .. External Functions .. &lt;BR /&gt;      DOUBLE PRECISION G05CAF &lt;BR /&gt;      EXTERNAL         G05CAF &lt;BR /&gt;*     .. External Subroutines ..required to initialize Function &lt;BR /&gt;      EXTERNAL         G05CBF &lt;BR /&gt;*     .. Executable Statements .. &lt;BR /&gt;      CALL G05CBF(3) &lt;BR /&gt;* &lt;BR /&gt;         TEST = G05CAF(X) &lt;BR /&gt;* &lt;BR /&gt;* &lt;BR /&gt;      END &lt;BR /&gt; &lt;BR /&gt;The idea here is just to confirm that this can be done. The code compiles &lt;BR /&gt;fine but the build stage returns the following errors: &lt;BR /&gt; &lt;BR /&gt;NAGLIB.LIB(x02ajft.obj) : error LNK2001: unresolved external symbol __FFljj &lt;BR /&gt;NAGLIB.LIB(g05cbft.obj) : error LNK2001: unresolved external symbol __FFljj &lt;BR /&gt;NAGLIB.LIB(g05caft.obj) : error LNK2001: unresolved external symbol __FFljj &lt;BR /&gt;NAGLIB.LIB(g05cazt.obj) : error LNK2001: unresolved external symbol __FFljj &lt;BR /&gt;NAGLIB.LIB(g05cayt.obj) : error LNK2001: unresolved external symbol __FFljj &lt;BR /&gt;Debug/nagdll.dll : fatal error LNK1120: 1 unresolved externals &lt;BR /&gt; &lt;BR /&gt;If I append a little main program which calls the function and compile it as &lt;BR /&gt;a console application then everything works fine and it builds and runs as &lt;BR /&gt;expected. I've played about with this for a while trying to follow some &lt;BR /&gt;suggestions from the help but I haven't met with any success. I suspect it &lt;BR /&gt;is a simple enough option change or a missing line of code or two and would appreciate any help in informing me of what action to take. &lt;BR /&gt; &lt;BR /&gt;Thanks, &lt;BR /&gt;Don.</description>
    <pubDate>Tue, 25 Sep 2001 22:28:30 GMT</pubDate>
    <dc:creator>Deleted_U_Intel</dc:creator>
    <dc:date>2001-09-25T22:28:30Z</dc:date>
    <item>
      <title>LNK2001</title>
      <link>https://community.intel.com/t5/Software-Archive/LNK2001/m-p/967651#M23265</link>
      <description>I am trying to write a simple dll file which calls a routine from Nag's Fortran Library mark 17. Unfortunately I am not meeting with much success. My code is as follows: &lt;BR /&gt; &lt;BR /&gt; DOUBLE PRECISION FUNCTION TEST(X) &lt;BR /&gt;     ! Expose subroutine nagdll to users of this DLL &lt;BR /&gt;     ! &lt;BR /&gt;     !DEC$ ATTRIBUTES DLLEXPORT::TEST &lt;BR /&gt;*     .. Local Scalars .. &lt;BR /&gt;      DOUBLE PRECISION X &lt;BR /&gt;* .. External Functions .. &lt;BR /&gt;      DOUBLE PRECISION G05CAF &lt;BR /&gt;      EXTERNAL         G05CAF &lt;BR /&gt;*     .. External Subroutines ..required to initialize Function &lt;BR /&gt;      EXTERNAL         G05CBF &lt;BR /&gt;*     .. Executable Statements .. &lt;BR /&gt;      CALL G05CBF(3) &lt;BR /&gt;* &lt;BR /&gt;         TEST = G05CAF(X) &lt;BR /&gt;* &lt;BR /&gt;* &lt;BR /&gt;      END &lt;BR /&gt; &lt;BR /&gt;The idea here is just to confirm that this can be done. The code compiles &lt;BR /&gt;fine but the build stage returns the following errors: &lt;BR /&gt; &lt;BR /&gt;NAGLIB.LIB(x02ajft.obj) : error LNK2001: unresolved external symbol __FFljj &lt;BR /&gt;NAGLIB.LIB(g05cbft.obj) : error LNK2001: unresolved external symbol __FFljj &lt;BR /&gt;NAGLIB.LIB(g05caft.obj) : error LNK2001: unresolved external symbol __FFljj &lt;BR /&gt;NAGLIB.LIB(g05cazt.obj) : error LNK2001: unresolved external symbol __FFljj &lt;BR /&gt;NAGLIB.LIB(g05cayt.obj) : error LNK2001: unresolved external symbol __FFljj &lt;BR /&gt;Debug/nagdll.dll : fatal error LNK1120: 1 unresolved externals &lt;BR /&gt; &lt;BR /&gt;If I append a little main program which calls the function and compile it as &lt;BR /&gt;a console application then everything works fine and it builds and runs as &lt;BR /&gt;expected. I've played about with this for a while trying to follow some &lt;BR /&gt;suggestions from the help but I haven't met with any success. I suspect it &lt;BR /&gt;is a simple enough option change or a missing line of code or two and would appreciate any help in informing me of what action to take. &lt;BR /&gt; &lt;BR /&gt;Thanks, &lt;BR /&gt;Don.</description>
      <pubDate>Tue, 25 Sep 2001 22:28:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/LNK2001/m-p/967651#M23265</guid>
      <dc:creator>Deleted_U_Intel</dc:creator>
      <dc:date>2001-09-25T22:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: LNK2001</title>
      <link>https://community.intel.com/t5/Software-Archive/LNK2001/m-p/967652#M23266</link>
      <description>It seems that the error you get has little or nothing to do with your code. LNK2001s you get indicate that &lt;B&gt;Naglib.lib&lt;/B&gt; links to missing imports. Now, I don't know anything about that library; however, you should check "Link/Object-library modules" on project settings to ensure that all necessary libraries are there. Possibly these settings differ for the dll in question and console app you mention. &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Wed, 26 Sep 2001 17:37:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/LNK2001/m-p/967652#M23266</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-09-26T17:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: LNK2001</title>
      <link>https://community.intel.com/t5/Software-Archive/LNK2001/m-p/967653#M23267</link>
      <description>Thanks for your help guys. I sorted the problem out by just arbitrarily varying the options. The library was correctly referenced in the linker options so I didn't need to change that. What I did change were the options in the Fortran/Libraries/Fortran Libraries section to the following: &lt;BR /&gt; &lt;BR /&gt;I ticked Use Multi Threaded Library &lt;BR /&gt;Reentrancy Support: Threaded &lt;BR /&gt;Use Run-time libraries: Static* &lt;BR /&gt; &lt;BR /&gt;This did the job. Thanks again for the help....it was the comparison of options between the console project and the dll project that set me off. &lt;BR /&gt; &lt;BR /&gt;Don.</description>
      <pubDate>Wed, 26 Sep 2001 23:42:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/LNK2001/m-p/967653#M23267</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-09-26T23:42:41Z</dc:date>
    </item>
  </channel>
</rss>

