Problem installing mingw version of gfortran
Peter Broer
D.P.Broer@uvt.nl
Fri Sep 19 09:26:00 GMT 2008
When I install the latest version of gfortran from
http://quatramaran.ens.fr/~coudert/gfortran/gfortran-windows.exe, and
try to compile and link the following simple programme
program test_matmul
implicit none
integer a(2,3),b(3),c(2),d(2)
a = reshape((/1,2,2,3,3,4/),shape(a))
print '(3I3)',a
b = (/1,2,3/)
c = (/1,1/)
d = c + matmul(a,b)
print '(3I3)',d
stop
end
with the command
gfortran matmul.for
I get the following error messages:
c:/program
files/gfortran/bin/../lib/gcc/i586-pc-mingw32/4.4.0/../../../libgfortran.a(list_read.o):
In function `nml_read_obj':
../../../trunk/libgfortran/io/list_read.c:2539: undefined reference to
`__mingw_snprintf'
../../../trunk/libgfortran/io/list_read.c:2450: undefined reference to
`__mingw_snprintf'
c:/program
files/gfortran/bin/../lib/gcc/i586-pc-mingw32/4.4.0/../../../libgfortran.a(list_read.o):
In function `nml_get_obj_data':
../../../trunk/libgfortran/io/list_read.c:2791: undefined reference to
`__mingw_snprintf'
../../../trunk/libgfortran/io/list_read.c:2669: undefined reference to
`__mingw_snprintf'
../../../trunk/libgfortran/io/list_read.c:2817: undefined reference to
`__mingw_snprintf'
c:/program
files/gfortran/bin/../lib/gcc/i586-pc-mingw32/4.4.0/../../../libgfortran.a(list_read.o):../../../trunk/libgfortran/io/list_read.c:2748:
more undefined references to `__mingw_snprintf' follow
collect2: ld returned 1 exit status
my "path" environment is:
PATH=c:\Program
Files\gfortran\libexec\gcc\i586-pc-mingw32\4.4.0;C:\Program
Files\gfortran\bin;C:\texmf\miktex27\miktex\bin;c:\imagemagick635;C:\Perl\bin;c:\texmf\miktex\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Intel\DMIX;C:\Program Files\Common Files\Roxio
Shared\DLLShared\;C:\Program Files\Common Files\Roxio
Shared\DLLShared\;C:\Program Files\Common Files\Roxio
Shared\9.0\DLLShared\;C:\LF9557\Bin;c:\g95\bin;c:\g95;C:\Program
Files\QuickTime\QTSystem\;f:\utils;"C:\Program
Files\PKWARE\PKZIPC\";c:\gstools\gs8.53\bin\;C:\Program
Files\gfortran\libexec\gcc\i586-pc-mingw32\4.4.0;C:\Program
Files\gfortran\bin
The installer puts the gfortran links at the back of the path, since
that didn't work, I copied them to the front, which doesn't work either.
I uninstalled, and reinstalled the version of August 2007 (gcc version
4.3.0), which compiles and runs fine.
--
Peter Broer
Netspar, Tilburg University, http://www.netspar.nl/
and
CPB Netherlands Bureau for Economic Policy Analysis,
http://www.cpb.nl/eng/org/homepages/dpb/
More information about the Fortran
mailing list