Re: Help linking f77 libraries into gfortran



$ gfortran -O2 -malign-double -mtune=pentium4 TA1Main.o random.o
TA1QPoutput.o TA1SelectPort.o TA1Neighbor.o TA1Calcqr.o TA1Threshold.o
TA1Solver.o TA1PSplot.o -L/cygdrive/c/Devel/MinGW/lib -lSLATEC
-lPSPLOT -lg2c -o TA1.exe
/cygdrive/c/Devel/MinGW/lib/libg2c.a(iio.o):iio.c:(.text+0x4c): undefined
reference to `__errno'

[ Steve commented on the use of -malign-double, I strongly second his
opinion that you'd be get rid of that flag. ]

It looks like you're mixing MinGW and Cygwin, and I actually don't know
well how this is supposed to work (never done it myself). But, looking at
Google results, it seems to be a FAQ, although a quick search did not
lead me to the answer. I suggest you ask this question on the appropriate
mingw or cygwin list, as it's probably more of a mingw/cygwin issue than
a g77/gfortran one.

Any way to look inside these libraries to determine dependencies?

nm is the usual tool to see what symbols object files (and libraries)
export and need.

Happy hacking!

--
FX
.