<?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 Re: Module location in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-location/m-p/1327777#M158282</link>
    <description>&lt;P&gt;It is ok to update.&amp;nbsp; Really there are few differences between the builds, but you will get better error codes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Luckily Fortran does not change as fast as say C#.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an interesting analogy, from 1929 to 1941 we moved from the&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;With Oscar Grubb aboard as&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Flight engineer" href="https://en.wikipedia.org/wiki/Flight_engineer" target="_blank"&gt;flight engineer&lt;/A&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Frank Hawks" href="https://en.wikipedia.org/wiki/Frank_Hawks" target="_blank"&gt;Frank Hawks&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;sets a&amp;nbsp;&lt;/SPAN&gt;&lt;A class="mw-redirect" title="Transcontinental airspeed record" href="https://en.wikipedia.org/wiki/Transcontinental_airspeed_record" target="_blank"&gt;transcontinental airspeed record&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for a flight across the&amp;nbsp;&lt;/SPAN&gt;&lt;A class="mw-redirect" title="Continental United States" href="https://en.wikipedia.org/wiki/Continental_United_States" target="_blank"&gt;continental United States&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;while ferrying the&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Lockheed Air Express" href="https://en.wikipedia.org/wiki/Lockheed_Air_Express" target="_blank"&gt;Lockheed Air Express&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;(registration NR7955) from the&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Lockheed Corporation" href="https://en.wikipedia.org/wiki/Lockheed_Corporation" target="_blank"&gt;Lockheed&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;factory in&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Burbank, California" href="https://en.wikipedia.org/wiki/Burbank,_California" target="_blank"&gt;Burbank&lt;/A&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;A title="California" href="https://en.wikipedia.org/wiki/California" target="_blank"&gt;California&lt;/A&gt;&lt;SPAN&gt;, to an&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Air show" href="https://en.wikipedia.org/wiki/Air_show" target="_blank"&gt;air show&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;in&amp;nbsp;&lt;/SPAN&gt;&lt;A title="New York City" href="https://en.wikipedia.org/wiki/New_York_City" target="_blank"&gt;New York City&lt;/A&gt;&lt;SPAN&gt;, making the flight in 18 hours 21 minutes.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;to the Spitfire.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 06 Nov 2021 15:30:07 GMT</pubDate>
    <dc:creator>JohnNichols</dc:creator>
    <dc:date>2021-11-06T15:30:07Z</dc:date>
    <item>
      <title>Module location</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-location/m-p/1327737#M158279</link>
      <description>&lt;P&gt;I thought I knew all about modules, but now a very simple example fails, and I guess I must have forgotten something.&lt;/P&gt;
&lt;P&gt;I started with a Visual Studio program.&amp;nbsp; I wanted to use a module that another program had created, but the compile fails with unresolved symbol error:&lt;/P&gt;
&lt;P&gt;Error 1 error LNK2019: unresolved external symbol _MCMAHON_mp_READPARAMETERS referenced in function _MAIN__ cycler.obj &lt;/P&gt;
&lt;P&gt;The module name is 'mcmahon', and I specified its location in Additional Include Directories.&lt;/P&gt;
&lt;P&gt;I next tried a simple test program compiled at the command line, with the same result.&lt;/P&gt;
&lt;P&gt;The module code is testmod.f90:&lt;/P&gt;
&lt;P&gt;module test_mod&lt;BR /&gt;implicit none&lt;/P&gt;
&lt;P&gt;contains&lt;/P&gt;
&lt;P&gt;subroutine adder(a,b,ab)&lt;BR /&gt;real :: a, b, ab&lt;/P&gt;
&lt;P&gt;ab = a+b&lt;BR /&gt;end subroutine&lt;/P&gt;
&lt;P&gt;end module&lt;/P&gt;
&lt;P&gt;The main program is test.f90:&lt;/P&gt;
&lt;P&gt;program main&lt;BR /&gt;use test_mod&lt;BR /&gt;implicit none&lt;/P&gt;
&lt;P&gt;real :: a, b, absum&lt;BR /&gt;a = 1&lt;BR /&gt;b = 2&lt;BR /&gt;call adder(a,b,absum)&lt;BR /&gt;write(*,*) 'absum: ',absum&lt;BR /&gt;end program&lt;/P&gt;
&lt;P&gt;If I compile with this, the build is successful:&lt;/P&gt;
&lt;P&gt;ifort test.f90 testmod.f90&lt;/P&gt;
&lt;P&gt;But if I first compile testmod.f90:&lt;/P&gt;
&lt;P&gt;ifort -c testmod.f90&lt;/P&gt;
&lt;P&gt;creating test_mod.mod, then try to compile test.f90 I get the same error as with Visual Studio:&lt;/P&gt;
&lt;P&gt;D:\testing\fortran\module&amp;gt;ifort test.f90&lt;BR /&gt;Intel(R) Visual Fortran Compiler Professional for applications running on IA-32,&lt;BR /&gt;Version 11.0 Build 20090609 Package ID: w_cprof_p_11.0.075&lt;BR /&gt;Copyright (C) 1985-2009 Intel Corporation. All rights reserved.&lt;/P&gt;
&lt;P&gt;Microsoft (R) Incremental Linker Version 8.00.50727.762&lt;BR /&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/P&gt;
&lt;P&gt;-out:test.exe&lt;BR /&gt;-subsystem:console&lt;BR /&gt;test.obj&lt;BR /&gt;test.obj : error LNK2019: unresolved external symbol _TEST_MOD_mp_ADDER referenc&lt;BR /&gt;ed in function _MAIN__&lt;BR /&gt;test.exe : fatal error LNK1120: 1 unresolved externals&lt;/P&gt;
&lt;P&gt;(Yes, I know it's a very old compiler, but it works well and suits my purposes.)&lt;/P&gt;
&lt;P&gt;What am I doing wrong, or not doing?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Gib&lt;/P&gt;</description>
      <pubDate>Sat, 06 Nov 2021 07:50:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-location/m-p/1327737#M158279</guid>
      <dc:creator>gib</dc:creator>
      <dc:date>2021-11-06T07:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Module location</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-location/m-p/1327740#M158280</link>
      <description>&lt;P&gt;Sorry!&amp;nbsp; I realised that what I need to do is include the associated .obj file in the build.&amp;nbsp; Working now.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Nov 2021 08:13:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-location/m-p/1327740#M158280</guid>
      <dc:creator>gib</dc:creator>
      <dc:date>2021-11-06T08:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Module location</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-location/m-p/1327777#M158282</link>
      <description>&lt;P&gt;It is ok to update.&amp;nbsp; Really there are few differences between the builds, but you will get better error codes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Luckily Fortran does not change as fast as say C#.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an interesting analogy, from 1929 to 1941 we moved from the&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;With Oscar Grubb aboard as&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Flight engineer" href="https://en.wikipedia.org/wiki/Flight_engineer" target="_blank"&gt;flight engineer&lt;/A&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Frank Hawks" href="https://en.wikipedia.org/wiki/Frank_Hawks" target="_blank"&gt;Frank Hawks&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;sets a&amp;nbsp;&lt;/SPAN&gt;&lt;A class="mw-redirect" title="Transcontinental airspeed record" href="https://en.wikipedia.org/wiki/Transcontinental_airspeed_record" target="_blank"&gt;transcontinental airspeed record&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for a flight across the&amp;nbsp;&lt;/SPAN&gt;&lt;A class="mw-redirect" title="Continental United States" href="https://en.wikipedia.org/wiki/Continental_United_States" target="_blank"&gt;continental United States&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;while ferrying the&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Lockheed Air Express" href="https://en.wikipedia.org/wiki/Lockheed_Air_Express" target="_blank"&gt;Lockheed Air Express&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;(registration NR7955) from the&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Lockheed Corporation" href="https://en.wikipedia.org/wiki/Lockheed_Corporation" target="_blank"&gt;Lockheed&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;factory in&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Burbank, California" href="https://en.wikipedia.org/wiki/Burbank,_California" target="_blank"&gt;Burbank&lt;/A&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;A title="California" href="https://en.wikipedia.org/wiki/California" target="_blank"&gt;California&lt;/A&gt;&lt;SPAN&gt;, to an&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Air show" href="https://en.wikipedia.org/wiki/Air_show" target="_blank"&gt;air show&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;in&amp;nbsp;&lt;/SPAN&gt;&lt;A title="New York City" href="https://en.wikipedia.org/wiki/New_York_City" target="_blank"&gt;New York City&lt;/A&gt;&lt;SPAN&gt;, making the flight in 18 hours 21 minutes.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;to the Spitfire.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Nov 2021 15:30:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-location/m-p/1327777#M158282</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2021-11-06T15:30:07Z</dc:date>
    </item>
  </channel>
</rss>

