On 4 Sep 2007 at 9:02, Waldek Hebisch wrote:
I wrote:
I have put a new gpc snapshot at:
Sorry for wrong link, the snapshot is at:
http://www.math.uni.wroc.pl/~hebisch/gpc/gpc-20070904.tar.bz2
Actually, I have found a major problem under Windows (Mingw) if built against gcc-3.4.5. If the compiler is installed in a directory that is different from the default (prefix) directory, it cannot find its files.
Here is an example from a "hello world" program that USES the gpc unit: c:/dev_gpc>gpc test.pas --automake -v Reading specs from c:/dev_gpc/bin/../lib/gcc/mingw32/3.4.5/specs Configured with: ../configure --with-gcc --with-gnu-ld --with-gnu-as -- host=mingw32 --target=mi ngw32 --prefix=/mingw --enable-threads --disable-nls --enable- languages=pascal --disable-win32- registry --disable-shared --enable-sjlj-exceptions --without-x --enable- interpreter --enable-ha sh-synchronization Thread model: win32 gpc version 20070904, based on gcc-3.4.5 (mingw special) c:/dev_gpc/bin/../libexec/gcc/mingw32/3.4.5/gpc1.exe -quiet -v -iprefix c:\dev_gpc\bin/../lib/ gcc/mingw32/3.4.5/ test.pas -quiet -dumpbase test.pas -auxbase test - version -famtmpfile=f:\tem p/ccPLjEsb.gpa -fautomake -o f:\temp/ccunt8Kc.s GNU Pascal version 20070904, based on gcc-3.4.5 (mingw special) (mingw32) compiled by GNU C version 3.4.5 (mingw special). GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=131006 GNU Pascal Compiler PreProcessor version 20070904, based on gcc-3.4.5 (mingw special)
test.pas:2: error: module/unit `gpc' could not be compiled
Here is the output when the same program is compiled without using any unit:
C:\dev_gpc>gpc test.pas --automake -v Reading specs from c:/dev_gpc/bin/../lib/gcc/mingw32/3.4.5/specs Configured with: ../configure --with-gcc --with-gnu-ld --with-gnu-as -- host=mingw32 --target=mi ngw32 --prefix=/mingw --enable-threads --disable-nls --enable- languages=pascal --disable-win32- registry --disable-shared --enable-sjlj-exceptions --without-x --enable- interpreter --enable-ha sh-synchronization Thread model: win32 gpc version 20070904, based on gcc-3.4.5 (mingw special) c:/dev_gpc/bin/../libexec/gcc/mingw32/3.4.5/gpc1.exe -quiet -v -iprefix c:\dev_gpc\bin/../lib/ gcc/mingw32/3.4.5/ test.pas -quiet -dumpbase test.pas -auxbase test - version -famtmpfile=f:\tem p/cc8tcCNb.gpa -fautomake -o f:\temp/cc6Ne4qd.s GNU Pascal version 20070904, based on gcc-3.4.5 (mingw special) (mingw32) compiled by GNU C version 3.4.5 (mingw special). GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=131006 GNU Pascal Compiler PreProcessor version 20070904, based on gcc-3.4.5 (mingw special)
as -o f:\temp/cc8X6dGi.o f:\temp/cc6Ne4qd.s c:/dev_gpc/bin/../libexec/gcc/mingw32/3.4.5/collect2.exe -Bdynamic c:/dev_gpc/bin/../lib/gcc/m ingw32/3.4.5/../../../crt2.o c:/dev_gpc/bin/../lib/gcc/mingw32/3.4.5/crtbegin.o -Lc:/dev_gpc/bi n/../lib/gcc/mingw32/3.4.5 -Lc:/dev_gpc/bin/../lib/gcc - Lc:/dev_gpc/bin/../lib/gcc/mingw32/3.4. 5/../../.. f:\temp/cc8X6dGi.o -lgpc -lmingw32 -lgcc -lmoldname -lmingwex - lmsvcrt -luser32 -lke rnel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt c:/dev_gpc/bin/../lib /gcc/mingw32/3.4.5/crtend.o
By comparison, when built against gcc-3.2.3, everything is fine - as in this example: C:\dev_gpc>gpc test.pas --automake -v Reading specs from c:/dev_gpc/bin/../lib/gcc-lib/mingw32/3.2.3/specs Configured with: ../configure --with-gcc --with-gnu-ld --with-gnu-as -- host=mingw32 --target=mi ngw32 --prefix=/mingw --enable-threads --disable-nls --enable- languages=pascal --disable-win32- registry --disable-shared --enable-sjlj-exceptions --without-x --enable- interpreter --enable-ha sh-synchronization Thread model: win32 gpc version 20070904, based on gcc-3.2.3 (mingw special 20030504-1) c:/dev_gpc/bin/../lib/gcc-lib/mingw32/3.2.3/gpc1.exe -v -iprefix c:\dev_gpc\bin/../lib/gcc-lib /mingw32/3.2.3/ -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=3 - D__GXX_ABI_VERSION=102 -D_WIN32 -D__WIN32 -D__WIN32__ -DWIN32 -D__MINGW32__ -D__MSVCRT__ -DWINNT -D_X86_=1 -D_WIN32 - D__WIN32 -D__WIN32__ -D__WIN32__ -D__MINGW32__ -D__MSVCRT__ -D__WINNT__ - D_X86_=1 -D__WIN32 -D_ _WINNT -Asystem=winnt -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 - Amachine=i386 -Di386 -D__ i386 -D__i386__ -D__tune_i586__ -D__tune_pentium__ - D__stdcall=__attribute__((__stdcall__)) -D_ _cdecl=__attribute__((__cdecl__)) - D__fastcall=__attribute__((__fastcall__)) -D_stdcall=__attri bute__((__stdcall__)) -D_cdecl=__attribute__((__cdecl__)) - D_fastcall=__attribute__((__fastcall __)) -D__declspec(x)=__attribute__((x)) test.pas -quiet -dumpbase test.pas -famtmpfile=f:\temp/ ccmELsFZ.gpa -fautomake -version -o f:\temp/ccy8mLaP.s GNU Pascal version is actually 20070904, based on gcc-3.2.3 (mingw special 20030504-1) GNU Pascal version 3.2.3 (mingw special 20030504-1) (mingw32) compiled by GNU C version 3.2.3 (mingw special 20030504-1). GNU Pascal Compiler PreProcessor version 20070904, based on gcc-3.2.3 (mingw special 20030504-1 ) (80386, BSD syntax) (80386, BSD syntax) Reading specs from c:/dev_gpc/bin/../lib/gcc-lib/mingw32/3.2.3/specs Configured with: ../configure --with-gcc --with-gnu-ld --with-gnu-as -- host=mingw32 --target=mi ngw32 --prefix=/mingw --enable-threads --disable-nls --enable- languages=pascal --disable-win32- registry --disable-shared --enable-sjlj-exceptions --without-x --enable- interpreter --enable-ha sh-synchronization Thread model: win32 gpc version 20070904, based on gcc-3.2.3 (mingw special 20030504-1) c:/dev_gpc/bin/../lib/gcc-lib/mingw32/3.2.3/gpc1.exe -v -iprefix c:\dev_gpc\bin/../lib/gcc-lib /mingw32/3.2.3/ -M -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=3 -D__GXX_ABI_VERSION= 102 -D_WIN32 -D__WIN32 -D__WIN32__ -DWIN32 -D__MINGW32__ -D__MSVCRT__ - DWINNT -D_X86_=1 -D_WIN3 2 -D__WIN32 -D__WIN32__ -D__WIN32__ -D__MINGW32__ -D__MSVCRT__ -D__WINNT__ -D_X86_=1 -D__WIN32 -D__WINNT -Asystem=winnt -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 - Amachine=i386 -Di386 - D__i386 -D__i386__ -D__tune_i586__ -D__tune_pentium__ - D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) - D__fastcall=__attribute__((__fastcall__)) -D_stdcall=__at tribute__((__stdcall__)) -D_cdecl=__attribute__((__cdecl__)) - D_fastcall=__attribute__((__fastc all__)) -D__declspec(x)=__attribute__((x)) c:/dev_gpc/bin/../lib/gcc- lib/mingw32/3.2.3/units/gp c.pas -o f:\temp/cca03208.exe -fautomake -famtmpfile=f:\temp/ccmELsFZ.gpa GNU Pascal Compiler PreProcessor version 20070904, based on gcc-3.2.3 (mingw special 20030504-1 ) (80386, BSD syntax) as --traditional-format -o f:\temp/ccAzTOPG.o f:\temp/ccy8mLaP.s c:/dev_gpc/bin/../lib/gcc-lib/mingw32/3.2.3/collect2.exe -Bdynamic c:/dev_gpc/bin/../lib/gcc-l ib/mingw32/3.2.3/../../../crt2.o c:/dev_gpc/bin/../lib/gcc- lib/mingw32/3.2.3/crtbegin.o -Lc:/de v_gpc/bin/../lib/gcc-lib/mingw32/3.2.3 -Lc:/dev_gpc/bin/../lib/gcc-lib - Lc:/dev_gpc/bin/../lib/ gcc-lib/mingw32/3.2.3/../../.. gpc.o f:\temp/ccAzTOPG.o -lgpc -lmingw32 - lgcc -lmoldname -lming wex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc - lmoldname -lmingwex -lms vcrt c:/dev_gpc/bin/../lib/gcc-lib/mingw32/3.2.3/crtend.o
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/