Problem installing mingw version of gfortran
Peter Broer
D.P.Broer@uvt.nl
Fri Sep 19 14:01:00 GMT 2008
Thanks Brian, that was really helpful. I hadn't thought of checking the
LIBRARY_PATH variable. It appears that there is a conflict with my g95
installation, which also uses libmingwex.a. The linker must have used
the g95 version all along, but, apparently, there wasn't a conflict before.
I suppose I just have to define separate environments for the two compilers.
best regards,
Peter Broer
Brian Dessent schreef:
> Peter Broer wrote:
>
>
>> ../../../trunk/libgfortran/io/list_read.c:2539: undefined reference to
>> `__mingw_snprintf'
>>
>
> I can't reproduce this problem. It works fine here:
>
> c:\tmp>gfortran -v
> Using built-in specs.
> Target: i586-pc-mingw32
> Configured with: ../trunk/configure --prefix=/mingw
> --enable-languages=c,fortran --with-gmp=/home/FX/local
> --with-ld=/mingw/bin/ld --with-as=/mingw/bin/as --disable-werror
> --enable-bootstrap --enable-threads --disable-nls
> --build=i586-pc-mingw32 --enable-libgomp --disable-shared
> Thread model: win32
> gcc version 4.4.0 20080603 (experimental) [trunk revision 136333] (GCC)
>
> C:\tmp>gfortran matmul.for
>
> C:\tmp>a
> 1 2 2
> 3 3 4
> 15 21
>
> The symbol __mingw_snprintf is provided by libmingwex.a, which should be
> at lib/mingwex.a under your install directory. I suspect that somehow
> you have an older version of this library (before this symbol was added)
> somewhere floating around in the search path and it's being found and
> used. If it wasn't finding libmingwex.a at all you'd get a lot more
> errors, so since it's just this one symbol which is a relatively recent
> addition to the library, that is why I suspect an older version is
> somewhere. You might want to try:
>
> c:\tmp>gfortran -Wl,--verbose matmul.for | grep "libmingwex.a succeeded"
> attempt to open
> c:/tmp/gfortran/bin/../lib/gcc/i586-pc-mingw32/4.4.0/../../../libmingwex.a
> succeeded
> attempt to open
> c:/tmp/gfortran/bin/../lib/gcc/i586-pc-mingw32/4.4.0/../../../libmingwex.a
> succeeded
>
> Figure out which version of libmingwex is being used and you should be
> able to track down your problem. You might also want to investigate
> your environment, for example if you have LIBRARY_PATH pointing to some
> other tool's installation it will cause it to search for -lmingwex from
> there.
>
> Brian
>
>
--
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