HP aC++/HP C A.06.25 Programmer's Guide
#if !defined(__LP64__) && !defined(__ia64)
_main();
#endif
/* Initialize the data object. Notice taking
the address of f is compatible with the
C++ reference construct.
*/
initialize_obj(&f);
/* Call the routine to manipulate the fields */
print_obj(f);
/* Destroy the data object */
delete_obj(f);
}
Compiling and Running the Sample Programs
To compile the example, run the following commands:
cc -ccfilename.c
aCC -cC++filename.C
aCC -oexecutable cfilename.o C++filename.o
NOTE: During the linking phase, the aCC driver program performs several functions
to support the C++ class mechanism. Linking programs that use classes with the C
compiler driver cc leads to unpredictable results at run time.
Calling HP FORTRAN 90 from HP aC++
This section discusses the following topics:
• The main() Function
• Function Naming Conventions
• Using Reference Variables to Pass Arguments
• Using extern "C" Linkage
• Strings
• Arrays
• Files in FORTRAN
Data Compatibility between C and C++ 253