I am compiling a g77 source code with the Protland Group’s Fortran 95. Everything seems to be ok until a C++ function is called from a fortran routine. I get an “undefined reference” error message. I suspect that it has something to do with the fact that the C++ function is in an archived library.
The C++routines are added to a library (libtest.a). This is done by compiling with the -c option and then placing the object files an archive (ar rl ./libtest.a *.o) .
The compilation goes smoothly when I use g77.
Are there any special considerations (compiler switches) during compilation for the call of c++ functions from fortran routines (as explained above).