This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
calling NAG dlls from Win32 gcc
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Subject: calling NAG dlls from Win32 gcc
- From: John Blackburn <John dot Blackburn at npl dot co dot uk>
- Date: Mon, 15 Oct 2001 17:01:04 +0100
Hello!
I am using the FSF g77 compiler for writing Fortran programs in
Microsoft Windows (NT), I understand it used gcc as a backend. My
question relates to how to link my Fortran program to NAG libraries
which are supplied as DLLs. I have a directory full of DLLs called such
things as NAGAC.dll etc. each file has what looks like an object file
associated with it: NAGAC.lib etc. and I have tried linking my program
to these as in
g77 -o prog.exe prog.f nagac.lib
but this doesn't seem to work. In fact if the file prog.f does _not_
contain any reference to external functions, the program compiles and
runs perfectly, but if I try to call a routine within the program, the
linker fails complaining of an undefined reference to the nag function I
was calling.
Can you help with this. I believe Win32 versions of gcc and by
extenstion g77 make use of DLLs so they should be able to call fortran
subroutines stored as DLLs somehow...
John.