<?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: Problem linking files in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-linking-files/m-p/743519#M2286</link>
    <description>Add -nofor_main to the ifort command doing the link. This tells ifort that the main program is not Fortran.</description>
    <pubDate>Thu, 15 Mar 2007 14:53:09 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2007-03-15T14:53:09Z</dc:date>
    <item>
      <title>Problem linking files</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-linking-files/m-p/743516#M2283</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I currently try to link a C-program and a Fortran-subprogram with some libraries:&lt;BR /&gt;
&lt;BR /&gt;
icc -c -Dr4 -Dp4 -DI686 testsuite.C &lt;BR /&gt;
ifort -c solve_rate.f &lt;BR /&gt;
ifort -g -L/opt/intel/fc/9.0/lib -lcprts -lcxaguard -lguide_stats
-lifcoremt -limf -lirc_s -lsvml -lcxa -lguide -lifcore -lifcoremt_pic
-lifport -lirc -lompstub -lunwind -o testsuite testsuite.o
solve_rate.o&lt;BR /&gt;
&lt;BR /&gt;
Precompiling works, however linking gives the following error messages:&lt;BR /&gt;
&lt;BR /&gt;
/opt/intel/fc/9.0/lib/for_main.o(.text+0x39): In function `main':&lt;BR /&gt;
: undefined reference to `MAIN__'&lt;BR /&gt;
&lt;BR /&gt;
However, in testsuite.C, I have defined a function void MAIN__(). I
also tried linking with ifort, but that gives the same error message.
Does anybody have an idea what I can do?&lt;BR /&gt;
&lt;BR /&gt;
Thank you in advance, &lt;BR /&gt;
&lt;BR /&gt;
Dominik&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Mar 2007 11:25:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-linking-files/m-p/743516#M2283</guid>
      <dc:creator>dschleic</dc:creator>
      <dc:date>2007-03-15T11:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem linking files</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-linking-files/m-p/743517#M2284</link>
      <description>&lt;P&gt;Dominik,&lt;/P&gt;
&lt;P&gt;It looks as if icc interprets testsuite.C file as C++ source. If you rename it to testsuite.c or alternatively add extern "C" linkage to MAIN__ that willsolve the problem.&lt;/P&gt;
&lt;P&gt;Dima&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2007 11:55:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-linking-files/m-p/743517#M2284</guid>
      <dc:creator>Dmitry_B_Intel</dc:creator>
      <dc:date>2007-03-15T11:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem linking files</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-linking-files/m-p/743518#M2285</link>
      <description>Oh sorry, it is really a C++ program, that was a typo up there.&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Mar 2007 14:03:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-linking-files/m-p/743518#M2285</guid>
      <dc:creator>dschleic</dc:creator>
      <dc:date>2007-03-15T14:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem linking files</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-linking-files/m-p/743519#M2286</link>
      <description>Add -nofor_main to the ifort command doing the link. This tells ifort that the main program is not Fortran.</description>
      <pubDate>Thu, 15 Mar 2007 14:53:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-linking-files/m-p/743519#M2286</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-03-15T14:53:09Z</dc:date>
    </item>
  </channel>
</rss>

