<?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 Linker errors in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Linker-errors/m-p/772978#M23509</link>
    <description>I have source code for what I wrote, and I have to link with two separate libraries (.lib) for which I do not have source code. How would I use the /FORCE command in this case?&lt;BR /&gt;&lt;BR /&gt;Also, why would the link step fail when creating the DLL, while the link step completed successfully (and a good executable was generated) in the instance when I created the executable version? (And I didn't need a /FORCE command in the link step of the executable version.)&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Bruno</description>
    <pubDate>Thu, 02 Dec 2010 17:29:38 GMT</pubDate>
    <dc:creator>Bruno_Repetto</dc:creator>
    <dc:date>2010-12-02T17:29:38Z</dc:date>
    <item>
      <title>Linker errors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Linker-errors/m-p/772976#M23507</link>
      <description>Dear friends:&lt;BR /&gt;&lt;BR /&gt;I have code consisting of a very simple "driver" 
main program, and a bunch of subroutines. I have no problems compiling,
 linking and executing this program. What I want to do next is convert 
just the set of subroutines into a DLL. This is where I get into 
trouble: it looks as though the linker is linking libraries in the wrong
 order. 
Also, there is a reference to a MAIN routine. There is no main program 
in the DLL project. What is it referring to?? Below is the link log.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any help/comments.&lt;BR /&gt;
&lt;BR /&gt;
Bruno W. Repetto, PhD&lt;BR /&gt;&lt;BR /&gt;1&amp;gt;------ Rebuild All started: Project: MyBusDLL, Configuration: Debug Win32 ------&lt;BR /&gt;1&amp;gt;Deleting intermediate files and output files for project 'MyBusDLL', configuration 'Debug|Win32'.&lt;BR /&gt;1&amp;gt;Compiling with Intel Visual Fortran Compiler XE 12.0.0.104 [IA-32]...&lt;BR /&gt;1&amp;gt;dataproc.for&lt;BR /&gt;1&amp;gt;heuristic.for&lt;BR /&gt;1&amp;gt;routing.for&lt;BR /&gt;1&amp;gt;support.for&lt;BR /&gt;1&amp;gt;Linking...&lt;BR /&gt;1&amp;gt;LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR90D.dll)&lt;BR /&gt;1&amp;gt;LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR90D.dll)&lt;BR /&gt;1&amp;gt;LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)&lt;BR /&gt;1&amp;gt;LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)&lt;BR /&gt;1&amp;gt;LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)&lt;BR /&gt;1&amp;gt;LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)&lt;BR /&gt;1&amp;gt;LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter already defined in MSVCRTD.lib(MSVCR90D.dll)&lt;BR /&gt;1&amp;gt;LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)&lt;BR /&gt;1&amp;gt;LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null already defined in MSVCRTD.lib(MSVCR90D.dll)&lt;BR /&gt;1&amp;gt;LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)&lt;BR /&gt;1&amp;gt;LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR90D.dll)&lt;BR /&gt;1&amp;gt;LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR90D.dll)&lt;BR /&gt;1&amp;gt;
 Creating library c:\\Work\\MergeDLL\\MyBusDLL\\MyBusDLL\\Debug\\MyBusDLL.lib 
and object c:\\Work\\MergeDLL\\MyBusDLL\\MyBusDLL\\Debug\\MyBusDLL.exp&lt;BR /&gt;1&amp;gt;LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library&lt;BR /&gt;1&amp;gt;LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library&lt;BR /&gt;1&amp;gt;libifcoremdd.lib(for_main.obj) : error LNK2019: unresolved external symbol _MAIN__ referenced in function _main&lt;BR /&gt;1&amp;gt;Debug\\MyBusDLL.dll : fatal error LNK1120: 1 unresolved externals&lt;BR /&gt;1&amp;gt;&lt;BR /&gt;1&amp;gt;Build log written to "file://c:\\Work\\MergeDLL\\MyBusDLL\\MyBusDLL\\Debug\\BuildLog.htm"&lt;BR /&gt;1&amp;gt;MyBusDLL - 14 error(s), 2 warning(s)&lt;BR /&gt;========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Dec 2010 03:34:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Linker-errors/m-p/772976#M23507</guid>
      <dc:creator>Bruno_Repetto</dc:creator>
      <dc:date>2010-12-02T03:34:15Z</dc:date>
    </item>
    <item>
      <title>Linker errors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Linker-errors/m-p/772977#M23508</link>
      <description>The messages are symptomatic of an attempt to link objects some of which were compiled with the /MT option and others that were compiled with the /MDd option.&lt;BR /&gt;&lt;BR /&gt;The fix, if you have the Fortran/C sources for everything, is to clean and rebuild. &lt;BR /&gt;&lt;BR /&gt;If you have only objects for some routines, you can use the /FORCE:multiple linker option as a last resort to try, but that is not recommended since it lets you link potentially incompatible libraries and objects and therefore may produce a malfunctioning EXE file.&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Dec 2010 14:48:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Linker-errors/m-p/772977#M23508</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2010-12-02T14:48:38Z</dc:date>
    </item>
    <item>
      <title>Linker errors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Linker-errors/m-p/772978#M23509</link>
      <description>I have source code for what I wrote, and I have to link with two separate libraries (.lib) for which I do not have source code. How would I use the /FORCE command in this case?&lt;BR /&gt;&lt;BR /&gt;Also, why would the link step fail when creating the DLL, while the link step completed successfully (and a good executable was generated) in the instance when I created the executable version? (And I didn't need a /FORCE command in the link step of the executable version.)&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Bruno</description>
      <pubDate>Thu, 02 Dec 2010 17:29:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Linker-errors/m-p/772978#M23509</guid>
      <dc:creator>Bruno_Repetto</dc:creator>
      <dc:date>2010-12-02T17:29:38Z</dc:date>
    </item>
    <item>
      <title>Linker errors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Linker-errors/m-p/772979#M23510</link>
      <description>I'd like to close this thread.&lt;BR /&gt;&lt;BR /&gt;I discovered what I was doing wrong. It had nothing to do with conflicting libraries or such, but rather that I had more code than what I needed to generate my DLL. Not sure why, but removing the extra code successfully produced a nice and usable DLL, with no warning messages at the link step.&lt;BR /&gt;&lt;BR /&gt;Thanks to all who responded.&lt;BR /&gt;&lt;BR /&gt;Bruno</description>
      <pubDate>Thu, 02 Dec 2010 18:06:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Linker-errors/m-p/772979#M23510</guid>
      <dc:creator>Bruno_Repetto</dc:creator>
      <dc:date>2010-12-02T18:06:38Z</dc:date>
    </item>
  </channel>
</rss>

