<?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 That example was just perfect in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-importing-array-variable-from-FORTRAN-module/m-p/1055645#M116291</link>
    <description>&lt;P&gt;That example was just perfect for my purpose. The only thing I had to do was to use the&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;!DEC$ ATTRIBUTES DLLEXPORT statement below every variable I needed. Now the code works without problems.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Nov 2015 08:56:59 GMT</pubDate>
    <dc:creator>aurora</dc:creator>
    <dc:date>2015-11-12T08:56:59Z</dc:date>
    <item>
      <title>Error importing array variable from FORTRAN module</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-importing-array-variable-from-FORTRAN-module/m-p/1055643#M116289</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to import some module data that is stored (and exported) from a dll. Also, I have a module.dll that exports a variable (&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;cubature2Dt_lengths) and then in my main code I want to use this variable.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;module.dll:&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;-----------------------------&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;MODULE cubature2Dt&lt;BR /&gt;
	!DEC$ ATTRIBUTES DLLEXPORT ::cubature2Dt_lengths&lt;/P&gt;

&lt;P&gt;IMPLICIT NONE&lt;/P&gt;

&lt;P&gt;INTEGER, DIMENSION(10), PARAMETER :: cubature2Dt_lengths=(/1,3,4,6,7,9,13,16,19,25/)&lt;/P&gt;

&lt;P&gt;END MODULE&amp;nbsp;cubature2Dt&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;------------------------------&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;code in exec that imports module.dll:&lt;BR /&gt;
	-------------------------------&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;SUBROUTINE subr(a1)&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;!DEC$ ATTRIBUTES DLLIMPORT ::&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;cubature2Dt_lengths&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;USE cubature2Dt,&lt;BR /&gt;
	-------------------------------&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;but this results in a compiler option (two times defined&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;cubature2Dt_lengths- with dllimport, and with USE statement). And then, if I remove the "DLLIMPORT" line, a unresolved symbol linker error appears. This linker problem does not happen with subroutines or single variables (doubles, integers) defined in the submodule.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;Is there any issue with arrays inside modules like the one in my example?&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;Is it possible what I'm trying?&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;How should this be done?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 17:17:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-importing-array-variable-from-FORTRAN-module/m-p/1055643#M116289</guid>
      <dc:creator>aurora</dc:creator>
      <dc:date>2015-11-10T17:17:03Z</dc:date>
    </item>
    <item>
      <title>Please build and run the DLL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-importing-array-variable-from-FORTRAN-module/m-p/1055644#M116290</link>
      <description>&lt;P&gt;Please build and run the &lt;SPAN style="color: rgb(0, 0, 0); font-family: 'Courier New', Courier, monospace; font-size: 13.3333px; line-height: 16px; background-color: rgb(245, 245, 245);"&gt;DLL_Shared_Data&lt;/SPAN&gt;&amp;nbsp;example in the compiler installation folders. If you do not configure and build the code correctly, what will happen is that both the DLL and the EXE contain separate copies of the module data, including the array that is of concern to you.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 17:29:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-importing-array-variable-from-FORTRAN-module/m-p/1055644#M116290</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-11-10T17:29:28Z</dc:date>
    </item>
    <item>
      <title>That example was just perfect</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-importing-array-variable-from-FORTRAN-module/m-p/1055645#M116291</link>
      <description>&lt;P&gt;That example was just perfect for my purpose. The only thing I had to do was to use the&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;!DEC$ ATTRIBUTES DLLEXPORT statement below every variable I needed. Now the code works without problems.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 08:56:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-importing-array-variable-from-FORTRAN-module/m-p/1055645#M116291</guid>
      <dc:creator>aurora</dc:creator>
      <dc:date>2015-11-12T08:56:59Z</dc:date>
    </item>
  </channel>
</rss>

