On 16 Feb 2005 at 17:25, Markus Gerwinski wrote:
Prof A Olowofoyeku (The African Chief) wrote:
What is the output of "gcc -print-file-name=libmingwex.a"?
C:\MinGW\lib\libmingwex.a. What now?
Your problem is baffling. The library can be found by the compiler, and you shouldn't even need os-hacks.h. I am unable to reproduce the problem, even with a freshly downloaded and installed Mingw release. Perhaps you should try manually adding "-lmingwex" to the command line ...
I wasn't quite sure where in the Makefile to add it. My first shot was writing it into the needed-options file:
make[1]: Entering directory `/home/gerwinsk/mysoftware/gcc-3.2.3/gcc/p/utils' ../.././xgpc -B../.././ -L../.. -I../rts --automake --executable-file-name -W -Wall -Wmissing-prototypes -Wmissing-declarations -g --executable-path=. --unit-path=/home/gerwinsk/mysoftware/gcc-3.2.3/gcc/p/rts --unit-path=/home/gerwinsk/mysoftware/gcc-3.2.3/gcc/p/units `cat needed-options` "binobj.pas" ../../libgpc.a(rts.o)(.text+0x180d): In function `p_CStringReadDir': C:/msys/1.0/home/gerwinsk/mysoftware/gcc-3.2.3/gcc/p/rts/rts.c:1546: undefined reference to `readdir' ../../libgpc.a(rts.o)(.text+0x17f1): In function `p_CStringOpenDir': C:/msys/1.0/home/gerwinsk/mysoftware/gcc-3.2.3/gcc/p/rts/rts.c:1541: undefined reference to `opendir' ../../libgpc.a(rts.o)(.text+0x183c): In function `p_CStringCloseDir': C:/msys/1.0/home/gerwinsk/mysoftware/gcc-3.2.3/gcc/p/rts/rts.c:1552: undefined reference to `closedir'
... but without any effect.
It is the Pascal compiler that is not doing what it should do. So, you may want to add "-lmingwex" to PFLAGS (and/or to LDFLAGS).
BTW: you *are* using Mingw "special" gcc sources, aren't you? Also: you should check "gcc-3.2.3\gcc\config\i386\mingw32.h" to make sure that the definition of "LIBGCC_SPEC" reads something like this: "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt"
Note the "-lmingwex" there. If it isn't there, then that is the source of your problem. You will need to insert it there, and then rebuild your compiler.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/