<?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 Thanks so much guys!  The C in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-calling-C-unresolved-external-symbol-memcpy/m-p/980554#M99628</link>
    <description>&lt;P&gt;Thanks so much guys!&amp;nbsp; The C project Configuration Properties\C/C++\Code Generation\RuntimeLibrary was set to Multi-threaded Debug (/MTd), and the Fortran\Libraries\Runtime Library was set to&amp;nbsp; Debug Multithreaded (/libs:static /threads/dbglibs), which seemed right to me.&amp;nbsp; But setting the Fortran Library to Debug Multithread DLL (/libs:dll /threads /dbglibs), maybe because the output is a DLL, did the trick!&lt;/P&gt;</description>
    <pubDate>Tue, 26 Mar 2013 17:20:51 GMT</pubDate>
    <dc:creator>Ken_C_1</dc:creator>
    <dc:date>2013-03-26T17:20:51Z</dc:date>
    <item>
      <title>Fortran calling C unresolved external symbol _memcpy</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-calling-C-unresolved-external-symbol-memcpy/m-p/980551#M99625</link>
      <description>&lt;P&gt;Have seen lots of other posts that seem tantalizingly close, but am still missing something.&lt;/P&gt;
&lt;P&gt;I'm converting an old mixed language CVF/VC 6.0 project&amp;nbsp; to IVF 11.1/VC 2005.&amp;nbsp; I let the dev environment separate the old combined project into the two separate C and F projects as requested, and both seem to compile fine.&amp;nbsp; The Fortran output is a DLL, and it calls a couple of C routines.&amp;nbsp; When the Fortran project attempts to link, the first errors I get are&lt;/P&gt;
&lt;P&gt;1&amp;gt;libirc.lib(fastmemcpy.obj) : error LNK2001: unresolved external symbol _memcpy&lt;BR /&gt;1&amp;gt;libirc.lib(tbk_backtrace.obj) : error LNK2001: unresolved external symbol _memcpy&lt;BR /&gt;1&amp;gt;simrfio.obj : error LNK2019: unresolved external symbol _memcpy referenced in function _SETSIMOUT&lt;/P&gt;
&lt;P&gt;SETSIMOUT is a Fortran subroutine that assigns common variables to members of a big structure for output.&amp;nbsp; The above errors go away if I comment out two lines that assign to members of an array.&amp;nbsp; There is nothing in this subroutine that explicitly calls any of my C routines, yet the assignment statement seems to be trying to use the C memcpy function.&lt;/P&gt;
&lt;P&gt;I also get bunches of errors looking for __fltused, __chkstk, all from Fortran files, then start getting __RTC_Shutdown, __RTC_InitBase etc in the actual C files.&lt;/P&gt;
&lt;P&gt;I've tried a couple of the library things mentioned in prior threads, to no avail. Probably something obvious in the settings, but any help would be appreciated.&lt;/P&gt;
&lt;P&gt;Ken&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2013 03:23:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-calling-C-unresolved-external-symbol-memcpy/m-p/980551#M99625</guid>
      <dc:creator>Ken_C_1</dc:creator>
      <dc:date>2013-03-26T03:23:22Z</dc:date>
    </item>
    <item>
      <title>Check if you are using</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-calling-C-unresolved-external-symbol-memcpy/m-p/980552#M99626</link>
      <description>&lt;P&gt;Check if you are using consistent RTL options in the two projects. In other words, use /MD for both, or /MT for both, but not a mix of the two. Failing this, attach the build logs.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2013 14:34:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-calling-C-unresolved-external-symbol-memcpy/m-p/980552#M99626</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2013-03-26T14:34:41Z</dc:date>
    </item>
    <item>
      <title>I agree with mecej4.   You</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-calling-C-unresolved-external-symbol-memcpy/m-p/980553#M99627</link>
      <description>&lt;P&gt;I agree with mecej4.&amp;nbsp;&amp;nbsp; You seem to have a problem linking the Microsoft C run-time libraries.&amp;nbsp; Are you using Microsoft C for that part of your project?&amp;nbsp; If your C is defaulting to cdecl ABI, you should permit ifort to do the same (don't use /iface:cvf). (and be sure to rebuild all .obj).&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2013 14:51:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-calling-C-unresolved-external-symbol-memcpy/m-p/980553#M99627</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2013-03-26T14:51:00Z</dc:date>
    </item>
    <item>
      <title>Thanks so much guys!  The C</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-calling-C-unresolved-external-symbol-memcpy/m-p/980554#M99628</link>
      <description>&lt;P&gt;Thanks so much guys!&amp;nbsp; The C project Configuration Properties\C/C++\Code Generation\RuntimeLibrary was set to Multi-threaded Debug (/MTd), and the Fortran\Libraries\Runtime Library was set to&amp;nbsp; Debug Multithreaded (/libs:static /threads/dbglibs), which seemed right to me.&amp;nbsp; But setting the Fortran Library to Debug Multithread DLL (/libs:dll /threads /dbglibs), maybe because the output is a DLL, did the trick!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2013 17:20:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-calling-C-unresolved-external-symbol-memcpy/m-p/980554#M99628</guid>
      <dc:creator>Ken_C_1</dc:creator>
      <dc:date>2013-03-26T17:20:51Z</dc:date>
    </item>
  </channel>
</rss>

