<?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 _stdcall in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/stdcall/m-p/983531#M26583</link>
    <description>Have simple mixed c++ main call to fortran subroutine working, but calling multiple subroutines from the same cmain.cpp is "different." &lt;BR /&gt; &lt;BR /&gt;two separate function statements in c++ main to the fortran subroutines as &lt;BR /&gt;extern void _stdcall IADDTWO (long *i,long *j,long *k); &lt;BR /&gt;and &lt;BR /&gt;extern void _stdcall FSUB (double *c); &lt;BR /&gt;generate an &lt;BR /&gt;error LNK2001: unresolved external symbol "void __stdcall FSUB(double *)" (?FSUB@@YGXPAN@Z) &lt;BR /&gt; &lt;BR /&gt;roughly the same thing occurs on reordering the statements: &lt;BR /&gt;error LNK2001: unresolved external symbol "void __stdcall IADDTWO(long *,long *,long *)" (?IADDTWO@@YGXPAJ00@Z) &lt;BR /&gt; &lt;BR /&gt;running the cmain.cpp program with only a call to one or the other fortran routine works fine. &lt;BR /&gt; &lt;BR /&gt;Alternatively, parsing the statement as  &lt;BR /&gt;extern void _stdcall FSUB (double *c), IADDTWO (long *i,long *j,long *k); &lt;BR /&gt;alone has a successful link and "run."  "run" is in quotes for the console application because the "illegal operation" message box activates.  On closing the box, the program seems to terminate normally. &lt;BR /&gt; &lt;BR /&gt;Guessing that directly aliasing the functions may work, but even if it does I'd like to understand what's going on with calls noted.</description>
    <pubDate>Wed, 13 Feb 2002 07:36:57 GMT</pubDate>
    <dc:creator>Intel_C_Intel</dc:creator>
    <dc:date>2002-02-13T07:36:57Z</dc:date>
    <item>
      <title>_stdcall</title>
      <link>https://community.intel.com/t5/Software-Archive/stdcall/m-p/983531#M26583</link>
      <description>Have simple mixed c++ main call to fortran subroutine working, but calling multiple subroutines from the same cmain.cpp is "different." &lt;BR /&gt; &lt;BR /&gt;two separate function statements in c++ main to the fortran subroutines as &lt;BR /&gt;extern void _stdcall IADDTWO (long *i,long *j,long *k); &lt;BR /&gt;and &lt;BR /&gt;extern void _stdcall FSUB (double *c); &lt;BR /&gt;generate an &lt;BR /&gt;error LNK2001: unresolved external symbol "void __stdcall FSUB(double *)" (?FSUB@@YGXPAN@Z) &lt;BR /&gt; &lt;BR /&gt;roughly the same thing occurs on reordering the statements: &lt;BR /&gt;error LNK2001: unresolved external symbol "void __stdcall IADDTWO(long *,long *,long *)" (?IADDTWO@@YGXPAJ00@Z) &lt;BR /&gt; &lt;BR /&gt;running the cmain.cpp program with only a call to one or the other fortran routine works fine. &lt;BR /&gt; &lt;BR /&gt;Alternatively, parsing the statement as  &lt;BR /&gt;extern void _stdcall FSUB (double *c), IADDTWO (long *i,long *j,long *k); &lt;BR /&gt;alone has a successful link and "run."  "run" is in quotes for the console application because the "illegal operation" message box activates.  On closing the box, the program seems to terminate normally. &lt;BR /&gt; &lt;BR /&gt;Guessing that directly aliasing the functions may work, but even if it does I'd like to understand what's going on with calls noted.</description>
      <pubDate>Wed, 13 Feb 2002 07:36:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/stdcall/m-p/983531#M26583</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2002-02-13T07:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: _stdcall</title>
      <link>https://community.intel.com/t5/Software-Archive/stdcall/m-p/983532#M26584</link>
      <description>C++ name mangling.  Use:&lt;BR /&gt;&lt;BR /&gt;extern "C" void ...&lt;BR /&gt;&lt;BR /&gt;instead.  This is discussed in the mixed-language programming chapter of the Programmer's Guide.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 13 Feb 2002 08:25:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/stdcall/m-p/983532#M26584</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2002-02-13T08:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: _stdcall</title>
      <link>https://community.intel.com/t5/Software-Archive/stdcall/m-p/983533#M26585</link>
      <description>Don't know much about mixed programming, &lt;BR /&gt;Don't know much about extern "C" &lt;BR /&gt; &lt;BR /&gt;But it seemed to work from the call indicated in a recent string call discussion: &lt;BR /&gt;Reply From:     Jugoslav Dujic    &lt;BR /&gt;February 12,2002 6:15am  &lt;BR /&gt; &lt;BR /&gt;For the previous two _stdcall query, the following two statements work and the program terminates properly: &lt;BR /&gt; &lt;BR /&gt;extern void _stdcall FSUB (double *c); &lt;BR /&gt;extern "C" void _stdcall IADDTWO (long *i,long *j,long *k); &lt;BR /&gt; &lt;BR /&gt;Note that the standard  &lt;BR /&gt; &lt;BR /&gt;#ifdef __cplusplus &lt;BR /&gt;extern "C"  &lt;BR /&gt;#endif &lt;BR /&gt; &lt;BR /&gt;was invoked above the void function statement.  The second forced reference worked and no aliasing was necessary in the fortran subroutine(s). &lt;BR /&gt; &lt;BR /&gt;Thank you, Mr. Dujic et. al.</description>
      <pubDate>Wed, 13 Feb 2002 08:34:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/stdcall/m-p/983533#M26585</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2002-02-13T08:34:17Z</dc:date>
    </item>
  </channel>
</rss>

