- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been experimenting with FORTRAN/C mixed language programming. The documentation is a littleunclear on calling conventions bit the following seems to work ( I have access to the C and FORTRAN code)
1) Make the C routine declaration and any FORTRAN call upper case
2) No need to use __stdcal or any compiler directives
3) No worries about passing character strings -lengths now at end of argument list
This all seems to work but I am still gettinga failure I cannot trace (even with -traceback I get no tracenack). Can someone confirm this is the correct way to mix languages or do I need some compiler options/directives
Stuart Connell
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's generally a good way to get interoperability without resorting to directives. Of course, you'd want to make sure that the C calls to Fortran pass arguments by address (except for string lengths.)
If you need help, please send a test case to Intel Premier Support and we'll take a look.
If you need help, please send a test case to Intel Premier Support and we'll take a look.
Reply
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