<?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: Prototyping C / C++ in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Prototyping-C-C/m-p/972480#M24285</link>
    <description>Actually, there is a translating tool developed recently (Win32 headers in CVF 6.6 were translated using it), but it's not publicly available. Try contacting vf_support@compaq.com -- perhaps they could translate it for you. Steve? &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
    <pubDate>Tue, 06 Nov 2001 20:04:49 GMT</pubDate>
    <dc:creator>Jugoslav_Dujic</dc:creator>
    <dc:date>2001-11-06T20:04:49Z</dc:date>
    <item>
      <title>Prototyping C / C++</title>
      <link>https://community.intel.com/t5/Software-Archive/Prototyping-C-C/m-p/972477#M24282</link>
      <description>I have a C++ header file from an third-party SDK that I want to interface to in FORTRAN. I think I can handle writing the SUBROUTINE and FUNCTION interfaces, but what about typedefs? Typedefs thtat point to other typedefs? Enumerations? #ifdef? #ifndef? #define? Is there any documentation on this?</description>
      <pubDate>Mon, 05 Nov 2001 19:40:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Prototyping-C-C/m-p/972477#M24282</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-11-05T19:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Prototyping C / C++</title>
      <link>https://community.intel.com/t5/Software-Archive/Prototyping-C-C/m-p/972478#M24283</link>
      <description>I'm afraid you're pretty much on your own here. I can offer only few general tips: &lt;BR /&gt; &lt;BR /&gt;- All typedefs (and #defines for type names) should be reduced to basic fortran types (INTEGER(x), REAL, LOGICAL, CHARACTER) following the path to the basic typedef (e.g. typedef int MYINT) Enumerations are integer(4) by C++ standard...&lt;BR /&gt; &lt;BR /&gt;- ...except, of course, derived types (structs)&lt;BR /&gt; &lt;BR /&gt;- Calling convention should be adjusted; you should specify !DEC$ATTRIBUTES C or STDCALL depending on how functions are declared in C header file. Note that CVF does not support __fastcall, which is default for VC++.&lt;BR /&gt; &lt;BR /&gt;- You should always specify ALIAS attribute for functions, specifying the exact mangled name as exported from DLL or lib.&lt;BR /&gt; &lt;BR /&gt;- #ifdefs can be emulated with !DEC$IF DEFINED / !DEC$ELSE / !DEC$ENDIF. Note, however, that it makes sense only for user-defined symbols. "Standard" C compiler symbols (such as _UNICODE, __cplusplus, _DEBUG) will not be automatically defined by CVF. Usually, simply don't translate #ifdef blocks you don't need (say, UNICODE).&lt;BR /&gt; &lt;BR /&gt;- Take care about pointer (*) or reference (&amp;amp;) arguments or their typedefs (typically Pxxxx or LPxxxx). Such function arguments should have !DEC$ATTRIBUTES REFERENCE. Especially, all strings (char*) should have REFERENCE attribute&lt;BR /&gt; &lt;BR /&gt;- It's a good idea to have two modules, one with constant and type declarations and other containing only INTERFACEs using the first. Moreover, you &lt;B&gt;have&lt;/B&gt; to do it if any function accepts derived type as an argument (because of scoping of interface blocks). &lt;BR /&gt; &lt;BR /&gt;I suggest you take some short Win32 header module from .../DF/Include and compare it against the corresponding C header file (or, if you don't have any, with C declarations in Win32 API). I think you'll get a rather good idea about techniques used. &lt;BR /&gt; &lt;BR /&gt;Regards&lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Tue, 06 Nov 2001 19:27:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Prototyping-C-C/m-p/972478#M24283</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-11-06T19:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Prototyping C / C++</title>
      <link>https://community.intel.com/t5/Software-Archive/Prototyping-C-C/m-p/972479#M24284</link>
      <description>Yikes! I would have thought Compaq could come up with something to automate this a little (like the module wizard). I think I might just see if the owners of the SDK want to do it....Thanks anyway Jugoslav</description>
      <pubDate>Tue, 06 Nov 2001 19:39:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Prototyping-C-C/m-p/972479#M24284</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-11-06T19:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Prototyping C / C++</title>
      <link>https://community.intel.com/t5/Software-Archive/Prototyping-C-C/m-p/972480#M24285</link>
      <description>Actually, there is a translating tool developed recently (Win32 headers in CVF 6.6 were translated using it), but it's not publicly available. Try contacting vf_support@compaq.com -- perhaps they could translate it for you. Steve? &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Tue, 06 Nov 2001 20:04:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Prototyping-C-C/m-p/972480#M24285</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-11-06T20:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Prototyping C / C++</title>
      <link>https://community.intel.com/t5/Software-Archive/Prototyping-C-C/m-p/972481#M24286</link>
      <description>The translation tool we have was written for the specific purpose of creating DFWIN and friends - and it embeds a lot of assumptions about this environment, including the limitations in the original MS declarations.  I don't think it's suitable for general use.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 07 Nov 2001 00:32:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Prototyping-C-C/m-p/972481#M24286</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2001-11-07T00:32:00Z</dc:date>
    </item>
  </channel>
</rss>

