Definition of _gfortran_os_error?

Tobias Burnus burnus@net-b.de
Mon Jun 2 09:38:00 GMT 2008


Hello Alberto,

Alberto Luaces wrote:
> I'm writing a mixed C++/Fortran program and recently I came into a linker 
> error about _gfortran_os_error, when linking with g++ and -lgfortran
>   
Are you by chance mixing different gfortran versions? For instance g++ 
and one gfortran under /usr/bin and a newer gfortran under 
"/home/alberto/gfortran" (or wherever)?

That could explain the problems. Then g++ picks up 
/usr/lib/libgfortran.so* and gfortran picks up another libgfortran.

If that is the case, try -L <path to gfortran lib> -lgfortran.

Tobias



More information about the Fortran mailing list