Linking error with g77

Hassan Aurag aurag@cae.com
Fri May 3 09:05:00 GMT 2002


Create a header file that defines c_functions as c_functions_, eg:

#define pprmpt_ pprmpt

And include it in your c files

Otherwise, use the no_underscore option of g77, but this is not
generally a good idea


On Fri, 2002-05-03 at 11:26, SUNIL K SAXENA wrote:
> Hi:
> 
> 	I am trying to port some codes over from AIX environment to
> LINUX 7.1.  I use g77 to compile fortran codes and gcc to compile C codes.
> The compilation is fine, but there is a problem with linking C files to
> the fortran. e.g  a program strutl.f calls a C subroutine pprmpt.c.  The
> compiler complains of a "undefined reference to pprmpt_" in strutl.f  Am I
> missing something and is there an easy fix.
> 
> 	Thanks
> 
> Sunil
> 
> 




More information about the Gcc-help mailing list