<?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: Controling /FORCE:MULTIPLE in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852726#M66543</link>
    <description>&lt;P&gt;Can anyone help even a little on this?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
    <pubDate>Tue, 12 Feb 2008 17:46:26 GMT</pubDate>
    <dc:creator>dajum</dc:creator>
    <dc:date>2008-02-12T17:46:26Z</dc:date>
    <item>
      <title>Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852725#M66542</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a project that I compile a main routine and other routine and then link with a library. I want to override a routine that exists in the library by including a new routine of the same name in with the main routines compilation. Then have the linker ignore the version that exists in the library. Without /FORCE:MULTIPLE in the compile/link commands,I get an error. With it I get a warning, but it is using the routine out of the library. I expected that since the source file iscompiled that it would have first priority, but that isn't happening. I can tell by the output of the executable that the library version was used. How can I get it use the source?My compile link commmandfollows. ASTAP.FOR contains the new routine, and proces.lib contains the orignal routine of the same name thatI want to override.&lt;/P&gt;
&lt;P&gt;astap.for /names:lowercase /Zi /Oy- /iface:cref /module:"c:v50ivfprocesproces___Win32_Release" /MT /libs:dll /iface:mixed_str_len_arg /include:c:v50ivfprocesproces___Win32_Release /nologo /assume:byterecl /extend_source:132 /optimize:5 /list /traceback /link /OUT:"astap.exe" /FORCE:MULTIPLE /INCREMENTAL:NO /NOLOGO /NODEFAULTLIB:"msvcrt.lib" /SUBSYSTEM:CONSOLE c:v50ivfprocesproces.lib c:v50ivfutilutility.lib c:v50ivfprocesisight.lib c:v50ivfproces	dsubproc.lib statwin.lib c:v50ivfprocessfmatlab.lib c:v50IVFutilutility.lib /MAP&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2008 04:32:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852725#M66542</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2008-02-11T04:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852726#M66543</link>
      <description>&lt;P&gt;Can anyone help even a little on this?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2008 17:46:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852726#M66543</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2008-02-12T17:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852727#M66544</link>
      <description>What compiler are you using here? Some of the options suggest CVF.&lt;BR /&gt;&lt;BR /&gt;Where is the main program coming from? &lt;BR /&gt;</description>
      <pubDate>Tue, 12 Feb 2008 18:03:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852727#M66544</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-12T18:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852728#M66545</link>
      <description>&lt;P&gt;Thanks for looking Steve,&lt;/P&gt;
&lt;P&gt;I'm using IVF 9.0.030. It was mutated from CVF. The main program is in ASTAP.FOR along with the routine I'm trying to use to replace the one of the same name in the library.&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2008 18:22:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852728#M66545</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2008-02-12T18:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852729#M66546</link>
      <description>I created my own example of this in 10.1 and VS2005 and it worked as I expected, with the routine in the main program being used. I got the messages:&lt;BR /&gt;&lt;BR /&gt;Linking...&lt;BR /&gt;lib5.lib(Source1.obj) : warning LNK4006: _SUB already defined in Console33.obj; second definition ignored&lt;BR /&gt;DebugConsole33.exe : warning LNK4088: image being generated due to /FORCE option; image may not run&lt;BR /&gt;&lt;BR /&gt;What did you see?&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Feb 2008 19:23:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852729#M66546</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-12T19:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852730#M66547</link>
      <description>&lt;P&gt;That is the message I get, but I know that it has actually linked the one from the library. The one in the library writes to a window on the screen, but one in astap.for just returns without doing anything. My executable writes to the window. Here is the messages I get.&lt;/P&gt;
&lt;P&gt;C:v50IVFsinda33modelsWORK&amp;gt;ifort @..infon.lnk&lt;BR /&gt;proces.lib(fwdbck.obj) : warning LNK4006: _wrstat already defined in astap.obj; second definition ignored&lt;BR /&gt;libifcorert.lib(libifcoremain.obj) : warning LNK4217: locally defined symbol __controlfp imported in function _testFPIEEE_RECORD&lt;BR /&gt;astap.exe : warning LNK4088: image being generated due to /FORCE option; image may not run&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2008 20:42:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852730#M66547</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2008-02-12T20:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852731#M66548</link>
      <description>Looking at the link map might be helpful. Otherwise, I'm out of ideas.&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Feb 2008 20:51:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852731#M66548</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-12T20:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852732#M66549</link>
      <description>&lt;P&gt;Selected lines from the .map file.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;0001:00000828 _wrstat 00401828 f astap.obj&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;0001:000108fe _wrstat. 004118fe f proces:fwdbck.obj&lt;/P&gt;
&lt;P&gt;THe code in astap.for&lt;/P&gt;
&lt;P&gt; subroutine wrstat(rout,val)&lt;BR /&gt; character*(*) rout&lt;BR /&gt; real val&lt;BR /&gt; return&lt;BR /&gt; end&lt;/P&gt;
&lt;P&gt;Now why the map was _wrstat. in it from proces confuses me. Expecially the dot after the name. Like the linker added it to the executable with an 8 character name instead of the 7 I expect. Seems if it was ignoring it, it wouldn't be included at all. &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2008 21:03:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852732#M66549</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2008-02-12T21:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852733#M66550</link>
      <description>That is odd. Do you have any ALIAS directives? Since you're using an unsupported version, there's not much else I can do.&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Feb 2008 21:58:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852733#M66550</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-12T21:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852734#M66551</link>
      <description>&lt;P&gt;This alias directive is inside of the wrstat routine in the library.&lt;/P&gt;
&lt;P&gt;!DEC$ ATTRIBUTES DLLIMPORT,ALIAS:'_cwrstat@8' :: CWRSTAT &lt;/P&gt;
&lt;P&gt;Its for the call to the routine in a DLL that writes to the window. &lt;/P&gt;
&lt;P&gt;Does that help?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2008 22:23:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852734#M66551</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2008-02-12T22:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852735#M66552</link>
      <description>Well, that will be fun. You have a STDCALL alias but have not specified /iface:cvf or /iface:stdref. Good recipe for stack corruption, unless there's something else I don't see.&lt;BR /&gt;&lt;BR /&gt;Anyway, you have changed the name of CWRSTAT in the routine to be the STDCALL name, but did not (it seems) put a similar directive in the main program's version of that routine. Why DLLIMPORT inside the routine you're declaring?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Feb 2008 00:28:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852735#M66552</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-13T00:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852736#M66553</link>
      <description>&lt;P&gt;I think you misunderstood. That Alias is for a different routine. Notice WRSTAT is the routine I'm trying to replace in the library. WRSTAT calls CWRSTAT, which has the alias as it is in a DLL.&lt;/P&gt;
&lt;P&gt;That is the only alias around this command. But it doesn't explain to me why the compiler would say it is ignoring a library routine, and then use it. And then give it a different name in the .map file. &lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2008 15:58:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852736#M66553</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2008-02-13T15:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852737#M66554</link>
      <description>Not compiler, linker. What happens if you temporarily change the name of the routine in the library and then rebuild?&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Feb 2008 16:14:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852737#M66554</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-13T16:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852738#M66555</link>
      <description>&lt;P&gt;Is that possible to do without changing the source code?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2008 16:27:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852738#M66555</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2008-02-13T16:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852739#M66556</link>
      <description>No. I was wondering if the global name in the call from the main program didn't match that of the routine. What happens if you take your preferred routine, compile it separately, and add the object to the link?&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Feb 2008 16:42:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852739#M66556</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-13T16:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852740#M66557</link>
      <description>&lt;P&gt;I'm not sure I did what you asked. I took wrstat out of astap.for and compiled it separately. Then added that .obj name to the link list. It still gets the same duplicate name error and uses the version from the library. &lt;/P&gt;
&lt;P&gt;One thing that may be impacting this is that that wrstat.obj doesn't exist in the library. That original routine is contained in a source file with another routine called FWDBCK. That name appears in the library (fwdbck.obj). I could remove that from the library and compile my astap.for file (also not using fwdbck) and it used the version of wrstat from inside astap.for successfully. So I wonder if the compiler gets confused by not being able to find wrstat.obj as an entity/name in the library, and when it links in fwdbck, it automatically pulls in wrstat as well. &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2008 17:09:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852740#M66557</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2008-02-13T17:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852741#M66558</link>
      <description>The compiler has little to do with this, and the names of object files are not relevant. All that matters is the global name used in the call and the one defined in the routine.&lt;BR /&gt;&lt;BR /&gt;My guess is that the library defines two names for the routine - one that conflicts with your new routine and one that doesn't, and that for some reason (since I don't have a complete test case) the main program is calling the name used in the library.&lt;BR /&gt;&lt;BR /&gt;Try this. Link JUST the main program source without the library. You'll get errors, but is the routine name one of them?&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Feb 2008 17:25:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852741#M66558</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-13T17:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852742#M66559</link>
      <description>&lt;P&gt;linking the main doesn't show an error for wrstat, but I guess I wouldn't expect it to since it is only called from within library routines.&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2008 17:39:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852742#M66559</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2008-02-13T17:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852743#M66560</link>
      <description>Oh, you didn't say that! (Or I missed it.) That's the way the linker works. Once the main program object is processed, it is not looked at again for references that come from later-seen objects and libraries. You might try the "force symbol reference" linker option to see if that makes a difference. You'd have to give the fully decorated global name of the routine.&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Feb 2008 17:55:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852743#M66560</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-13T17:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Controling /FORCE:MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852744#M66561</link>
      <description>&lt;P&gt;Even more interesting. I added a new routine to the main source astap.for. It overrides a different routine in the library. In that routine I call WRSTAT. When I compile/link I still get the message that the second verison of WRSTAT is ignored. The new routine does indeed override the library version and there is no error message saying it found two. But it calls wrstat and it also gets the version from the library.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2008 18:10:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Controling-FORCE-MULTIPLE/m-p/852744#M66561</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2008-02-13T18:10:05Z</dc:date>
    </item>
  </channel>
</rss>

