Linking FORTRAN and C++ objects files
I am going to call a C++ function from FORTRAN, for which I am using ISO_C_Binding module. After compaction of the FORTRAN main file and C++ function with commands gfortran -c mlp8.f90 g++ -c mean_cpp.cc Which will create the objects files but in the linking phase as suggested by some members I am going to use the commands g++ mlp8.o mean_cpp.o -o main –lgfortran I.e. using C++ compiler with linking to FORTRAN libraries but it gives error like /Cygnus/cygwin-b20/H-i586-cygwin32/i586-win32/bin/ld: cannot open –lgfortran: No such a file or directory Collect2:ld return 1 exit status So I think