<?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 DEC attributes to create DLL for vb.net and excel in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DEC-attributes-to-create-DLL-for-vb-net-and-excel/m-p/880798#M75188</link>
    <description>I have a Fortran DLL project that I am building in IVF11.1. The DLL has entry points that i would like to call from VB.net (VS2008) and also from Excel VBA macros. To find the entry points, i included in the following two lines in each fionction/subroutine that i call from vb.net/excel:&lt;BR /&gt;&lt;BR /&gt;!dec$ attributes dllexport :: MW_fnc&lt;BR /&gt;!dec$ attributes stdcall, REFERENCE, alias :'MW_F' :: MW_FNC&lt;BR /&gt;&lt;BR /&gt;The name of the function, in this case, is real(8) Function MW_fnc.&lt;BR /&gt;&lt;BR /&gt;This allows me to then DECLARE the function MW_F in VB.net and in Excel VBA. &lt;BR /&gt;&lt;BR /&gt;The problem is this -- the source code is split up into a few different files. The MW_FNC routine is contained in FILEA.f. There is a second routine (SABS_F) that makes use of this function, but it is in FileB.f. WhenI compile/link the code, i get the error:&lt;BR /&gt;Error 11 error LNK2019: unresolved external symbol _MW_FNC referenced in function SABS_F. entropy.obj &lt;BR /&gt;&lt;BR /&gt;I also end up with warnings that are something like this for other functions that do not have the second DEC statement (i.e., they are not aliased):&lt;BR /&gt;Warning 5 warning : locally defined symbol __imp__DENSITYSITOIP_FNC imported Release\h_air.obj &lt;BR /&gt;Warning 10 warning LNK4217: locally defined symbol _DENSITYSITOIP_FNC imported in function _GETDENSITYFORFLOWRATE_FNC h_air.obj &lt;BR /&gt;&lt;BR /&gt;I am pretty sure this all has to do with the DLLEXPORT, STDCALL, and ALIAS attributes, but i am at a loggerhead. Can someone help me?&lt;BR /&gt;&lt;BR /&gt;Kirby</description>
    <pubDate>Thu, 19 Nov 2009 19:07:23 GMT</pubDate>
    <dc:creator>kirbychapman</dc:creator>
    <dc:date>2009-11-19T19:07:23Z</dc:date>
    <item>
      <title>DEC attributes to create DLL for vb.net and excel</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DEC-attributes-to-create-DLL-for-vb-net-and-excel/m-p/880798#M75188</link>
      <description>I have a Fortran DLL project that I am building in IVF11.1. The DLL has entry points that i would like to call from VB.net (VS2008) and also from Excel VBA macros. To find the entry points, i included in the following two lines in each fionction/subroutine that i call from vb.net/excel:&lt;BR /&gt;&lt;BR /&gt;!dec$ attributes dllexport :: MW_fnc&lt;BR /&gt;!dec$ attributes stdcall, REFERENCE, alias :'MW_F' :: MW_FNC&lt;BR /&gt;&lt;BR /&gt;The name of the function, in this case, is real(8) Function MW_fnc.&lt;BR /&gt;&lt;BR /&gt;This allows me to then DECLARE the function MW_F in VB.net and in Excel VBA. &lt;BR /&gt;&lt;BR /&gt;The problem is this -- the source code is split up into a few different files. The MW_FNC routine is contained in FILEA.f. There is a second routine (SABS_F) that makes use of this function, but it is in FileB.f. WhenI compile/link the code, i get the error:&lt;BR /&gt;Error 11 error LNK2019: unresolved external symbol _MW_FNC referenced in function SABS_F. entropy.obj &lt;BR /&gt;&lt;BR /&gt;I also end up with warnings that are something like this for other functions that do not have the second DEC statement (i.e., they are not aliased):&lt;BR /&gt;Warning 5 warning : locally defined symbol __imp__DENSITYSITOIP_FNC imported Release\h_air.obj &lt;BR /&gt;Warning 10 warning LNK4217: locally defined symbol _DENSITYSITOIP_FNC imported in function _GETDENSITYFORFLOWRATE_FNC h_air.obj &lt;BR /&gt;&lt;BR /&gt;I am pretty sure this all has to do with the DLLEXPORT, STDCALL, and ALIAS attributes, but i am at a loggerhead. Can someone help me?&lt;BR /&gt;&lt;BR /&gt;Kirby</description>
      <pubDate>Thu, 19 Nov 2009 19:07:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DEC-attributes-to-create-DLL-for-vb-net-and-excel/m-p/880798#M75188</guid>
      <dc:creator>kirbychapman</dc:creator>
      <dc:date>2009-11-19T19:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: DEC attributes to create DLL for vb.net and excel</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DEC-attributes-to-create-DLL-for-vb-net-and-excel/m-p/880799#M75189</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;You must repeat the ATTRIBUTES line with STDCALL and ALIAS in any routine that wants to call the exported routine. The warnings are harmless and can be ignored.&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Nov 2009 19:48:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DEC-attributes-to-create-DLL-for-vb-net-and-excel/m-p/880799#M75189</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-11-19T19:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: DEC attributes to create DLL for vb.net and excel</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DEC-attributes-to-create-DLL-for-vb-net-and-excel/m-p/880800#M75190</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;&lt;BR /&gt;You must repeat the ATTRIBUTES line with STDCALL and ALIAS in any routine that wants to call the exported routine. The warnings are harmless and can be ignored.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;This &lt;A href="http://software.intel.com/en-us/forums/showpost.php?p=82841"&gt;previous thread &lt;/A&gt;in the forum may give you the answer you need&lt;BR /&gt;&lt;BR /&gt;David</description>
      <pubDate>Thu, 19 Nov 2009 23:48:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DEC-attributes-to-create-DLL-for-vb-net-and-excel/m-p/880800#M75190</guid>
      <dc:creator>DavidWhite</dc:creator>
      <dc:date>2009-11-19T23:48:11Z</dc:date>
    </item>
  </channel>
</rss>

