Topic
  • No replies
JamesPeterKelly
JamesPeterKelly
2 Posts

Pinned topic Do extern "C" and extern "FORTRAN" in XL C++ have the same result ?

‏2011-02-07T02:31:04Z |
Hi XL C/C++ gurus,

When calling XL Fortran code from XL C++ I have seen both extern "C" and extern "FORTRAN" used to define the linkage to Fortran subroutines and functions.

Do these result in exactly the same outcome ?

Or is there a material difference between using extern "C" and extern "FORTRAN" which would cause me to use one over the other when calling XL Fortran code.

The XL C++ manuals I have consulted seem to suggest that for current versions the only valid values for extern linkage are "C" and "C++", while immediately following that with examples that use extern "FORTRAN" - I'm confused !

James Kelly
HPC Specialist
IBM A/NZ
Updated on 2011-02-07T21:32:43Z at 2011-02-07T21:32:43Z by JamesPeterKelly
  • SystemAdmin
    SystemAdmin
    196 Posts

    Re: Do extern "C" and extern "FORTRAN" in XL C++ have the same result ?

    ‏2011-02-07T19:55:34Z  
    I believe the result is the same. From the code generated between extern "C" and extern "Fortran", there is no difference.

    Kelvin
  • JamesPeterKelly
    JamesPeterKelly
    2 Posts

    Re: Do extern "C" and extern "FORTRAN" in XL C++ have the same result ?

    ‏2011-02-07T21:32:43Z  
    Kevin,

    Thanks for the answer !

    James