I'm compiling library for a private project, which depends on a number of libraries. Specifically one of the dependencies is compiled with Fortran. On some instances, I've seen the dependency compiled with g77
, on others I've seen it compiled with gfortran
. My project then is ./configure
'd to link with either -lg2c
or -lgfortran
, but so far I've been doing it by hand.
If it is possible, how can I find out, from looking into the dependent library (via e.g. nm
or some other utility?), whether the used compiler was g77
(and then I'll use -lg2c
in my link options) or gfortran
(and then I'll use -lgfortran
)?
Thanks in advance!
nm filename | fgrep ' __g77'
will give results if g77 was used, meanwhile
nm filename | fgrep '@@GFORTRAN'
will give results if gfortran is used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With