<?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: C++ objects in Fortran77 in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/c-objects-in-fortran77/m-p/3860155#M34771</link>
    <description>Paul,&lt;BR /&gt;&lt;BR /&gt;  Generic answer... on OpenVMS any language can call routines written in any other language. You just need to make sure the arguments match in position, data type and passing mechanism. For complex data types, there may be compatibility issues between languages, so it's best to keep interfaces as simple as possible. You may also have to force specific mechanisms using FORTRAN built-in functions %VAL, %REF &amp;amp; %DESCR &lt;BR /&gt;&lt;BR /&gt;  For C++ you have the added complication of name mangling - compiler generated names to keep them unique and fit within the name length limits of the OpenVMS linker. You can specify a C++ global entity has a non-mangled name, or, as Bob suggests, write a jacket interface with non-mangled names.&lt;BR /&gt;&lt;BR /&gt;  If you're really keen, you can determine the mangled names from the librarian, linker map or mangler/demangler utilities and call them directly, but the Fortran side will be rather cryptic!</description>
    <pubDate>Mon, 11 Sep 2006 21:12:51 GMT</pubDate>
    <dc:creator>John Gillings</dc:creator>
    <dc:date>2006-09-11T21:12:51Z</dc:date>
    <item>
      <title>C++ objects in Fortran77</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-objects-in-fortran77/m-p/3860153#M34769</link>
      <description>Hi everybody,&lt;BR /&gt;&lt;BR /&gt;does anyone know how to use a C++ class in Fortran77? And how to call C++ methods in Fortran77?&lt;BR /&gt;&lt;BR /&gt;Sincerely,&lt;BR /&gt;Paul Vinders</description>
      <pubDate>Mon, 11 Sep 2006 03:42:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-objects-in-fortran77/m-p/3860153#M34769</guid>
      <dc:creator>Paul Vinders</dc:creator>
      <dc:date>2006-09-11T03:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: C++ objects in Fortran77</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-objects-in-fortran77/m-p/3860154#M34770</link>
      <description>Paul,&lt;BR /&gt;&lt;BR /&gt;One way (which I implemented for a client product) is to write a C-calling convention set of binding routines.&lt;BR /&gt;&lt;BR /&gt;How easy this is depends on what precisely the interface specification is.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter</description>
      <pubDate>Mon, 11 Sep 2006 04:19:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-objects-in-fortran77/m-p/3860154#M34770</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2006-09-11T04:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: C++ objects in Fortran77</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-objects-in-fortran77/m-p/3860155#M34771</link>
      <description>Paul,&lt;BR /&gt;&lt;BR /&gt;  Generic answer... on OpenVMS any language can call routines written in any other language. You just need to make sure the arguments match in position, data type and passing mechanism. For complex data types, there may be compatibility issues between languages, so it's best to keep interfaces as simple as possible. You may also have to force specific mechanisms using FORTRAN built-in functions %VAL, %REF &amp;amp; %DESCR &lt;BR /&gt;&lt;BR /&gt;  For C++ you have the added complication of name mangling - compiler generated names to keep them unique and fit within the name length limits of the OpenVMS linker. You can specify a C++ global entity has a non-mangled name, or, as Bob suggests, write a jacket interface with non-mangled names.&lt;BR /&gt;&lt;BR /&gt;  If you're really keen, you can determine the mangled names from the librarian, linker map or mangler/demangler utilities and call them directly, but the Fortran side will be rather cryptic!</description>
      <pubDate>Mon, 11 Sep 2006 21:12:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-objects-in-fortran77/m-p/3860155#M34771</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2006-09-11T21:12:51Z</dc:date>
    </item>
  </channel>
</rss>

