GNU Info

Info Node: (g77-295.info)C++ Considerations

(g77-295.info)C++ Considerations


Next: Startup Code Prev: f2c Skeletons and Prototypes Up: Interoperating with C and C++
Enter node , (file) or (file)node

C++ Considerations
------------------

   `f2c' can be used to generate suitable code for compilation with a
C++ system using the `-C++' option.  The important thing about linking
`g77'-compiled code with C++ is that the prototypes for the `g77'
routines must specify C linkage to avoid name mangling.  So, use an
`extern "C"' declaration.  `f2c''s `-C++' option will take care of this
when generating skeletons or prototype files as above, and also avoid
clashes with C++ reserved words in addition to those in C.


automatically generated by info2www version 1.2.2.9