HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: C++ objects in Fortran77
Operating System - OpenVMS
1827452
Members
3899
Online
109965
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2006 08:42 PM
09-10-2006 08:42 PM
C++ objects in Fortran77
Hi everybody,
does anyone know how to use a C++ class in Fortran77? And how to call C++ methods in Fortran77?
Sincerely,
Paul Vinders
does anyone know how to use a C++ class in Fortran77? And how to call C++ methods in Fortran77?
Sincerely,
Paul Vinders
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2006 09:19 PM
09-10-2006 09:19 PM
Re: C++ objects in Fortran77
Paul,
One way (which I implemented for a client product) is to write a C-calling convention set of binding routines.
How easy this is depends on what precisely the interface specification is.
- Bob Gezelter
One way (which I implemented for a client product) is to write a C-calling convention set of binding routines.
How easy this is depends on what precisely the interface specification is.
- Bob Gezelter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2006 02:12 PM
09-11-2006 02:12 PM
Re: C++ objects in Fortran77
Paul,
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 & %DESCR
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.
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!
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 & %DESCR
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.
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!
A crucible of informative mistakes
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP