Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linking to custom lib's, mod's not made with gfortran

Status
Not open for further replies.

dcantwell

Programmer
Nov 1, 2011
1
US
Hello All,

I am new to FORTRAN, and I am investigating if it is possible to link to binaries generated with Visual Fortran (Composer XE 2011) when using the gfortran compiler to generate the final executable. For example, when I tried to use *.mod files compiled with VF I got the error message:

Fatal Error: File 'module_gpops.mod' opened at (1) is not a GFORTRAN module file

So I tried to create libraries with VF and link against them with the command

gfortran -ffree-form -ffree-line-length-none -fimplicit-none -fno-range-check -Wall -g -L/home/dcantwell/launch -lgpopsf -lsnopts C:/home/GPOPS/launch/modules/*.f90 C:/home/GPOPS/launch/src/*.f90 -o launch.exe

but got the error

Fatal Error: Can't open module file 'module_gpops.mod' for reading at (1): No such file or directory

The modules were contained in the libraries (libgpopsf.a, libsnopts.a) I made with VF. Is it just not possible to link with binaries not made with gfortran, or am I doing something wrong that can be corrected? Thnx for any help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top