For some reason, is your version of gfortran different from the version of your g++ ? Or maybe it is installed elsewhere?
The -lname parameter (in this case name is gfortran ) tells the linker to search for the library file named libname.a in the library search path. If it is found and static binding is not applied using the parameter -[B]static , the linker will again look for libname.so and instead refer to it (if it is found). If libname.a not found, an error will be libname.so despite the presence of libname.so .
In your installation, gfortran should be libgfortran.a . Find it with find and specify the path to g++ with -L/path/to/compiler/libs . If g++ is the same version as your gfortran , the path to libgfortran.a will already be present in the library search path (since both the static C / C ++ libraries and Fortran are in the same place). It will not be present if both compilers differ in their version.
For example, on a 64-bit system based on RedHat, libgfortran.a is located in /usr/lib/gcc/x86_64-redhat-linux/<GCC version>/ , and the common libgfortran.so.* Is located in /usr/lib64 .
An alternative solution is to replace -lgfortran with /usr/lib/libgfortran.so.3 .
Option -L. rather associated with -lCGAL than with -lgfortran .
Hristo iliev
source share