Hello, all
I am still having trouble with the RHIDE and gpc setup. I have fixed my problems with environment space, so the path is now fine. But I am not getting programs with grx20 to compile. Here is some output, with commentary:
When I compile from bash, at the command line, in the $DJDIR$ directory, I write: gpc --automake -v -o taste.exe contrib/grx232/pascal/taste.p -lgrx20 2> outfile Outfile then contains: Reading specs from c:/djgpp/lib/gcc-lib/djgpp/2.952/specs gpc version 20000725, based on 2.95.2 19991024 (release) c:/djgpp/lib/gcc-lib/djgpp/2.952/gpcpp.exe -lang-pascal -v -famtmpfile=c:/djgpp/tmp/RHcaaaaa\ccaqs0wh -fautomake -fdelphi-comments -D__GNU_PASCAL__ -undef -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__GPC__=2 -D__GPC_MINOR__=0 -D__GPC_RELEASE__=20000725 -D__BITS_LITTLE_ENDIAN__=1 -D__BYTES_LITTLE_ENDIAN__=1 -D__WORDS_LITTLE_ENDIAN__=1 -Dunix -Di386 -DGO32 -DDJGPP=2 -DMSDOS -D__OS_DOS__=1 -D__unix__ -D__i386__ -D__GO32__ -D__DJGPP__=2 -D__MSDOS__ -D__OS_DOS__=1 -D__unix -D__i386 -D__GO32 -D__DJGPP=2 -D__MSDOS -Asystem(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_pentium__ -imacros c:/djgpp/lib/../include/sys/version.h -remap contrib/grx232/pascal/taste.pas c:/djgpp/tmp/RHcaaaaa\ccbqs0wh.i GNU Pascal Compiler PreProcessor version 2.95.2 19991024 (release) (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: c:/djgpp/LANG/PASCAL [**] c:/djgpp/include c:/djgpp/contrib/grx232/include /usr/local/include [**] JDIR/i586-pc-msdosdjgpp/include [**] $DJDIR/lib/gcc-lib/djgpp/2.952/include $DJDIR/include [*@] End of search list. c:/djgpp/lib/gcc-lib/djgpp/2.952/gpc1.exe c:/djgpp/tmp/RHcaaaaa\ccbqs0wh.i -quiet -dumpbase taste.pas -version -famtmpfile=c:/djgpp/tmp/RHcaaaaa\ccaqs0wh -fautomake -o c:/djgpp/tmp/RHcaaaaa\ccbqs0wh.s GNU Pascal version 2.95.2 19991024 (release) (djgpp) compiled by GNU C version 2.95.2 19991024 (release). c:/djgpp/bin/as.exe -o c:/djgpp/tmp/RHcaaaaa\ccbqs0wh1.o c:/djgpp/tmp/RHcaaaaa\ccbqs0wh.s c:/djgpp/lib/gcc-lib/djgpp/2.952/collect2.exe -o taste.exe c:/djgpp/lib/crt0.o -Lc:/djgpp/lib -Lc:/djgpp/contrib/grx232/lib/dj2 -Lc:/djgpp/lib/gcc-lib/djgpp/2.952 -Lc:/djgpp/bin -Lc:/djgpp/lib c:/djgpp/tmp/RHcaaaaa\ccbqs0wh1.o -lgrx20 -lgpc -lm -lgcc -lc -lgcc -Tdjgpp.djl c:/djgpp/tmp/RHcaaaaa\ccbqs0wh1.o(.text+0x9cb):taste.pas: undefined reference to `init_Grx20' collect2: ld returned 1 exit status
Some comments on this: Why am I still getting an "undefined reference to init_Grx20, when I am linking in libgrx20.a? What more can I do about it?
How can I remove the directories flagged with [**] above from the include list, seeing as they don't exist? How can I remove a duplicate directory (marked [*2] above)?
Output from within RHIDE is essentially identical, with a few slightly different compiler options. The same result and error, though.
On a more positive note, I have succeeded in compiling grx20.pas, so now I have a $DJDIR$/bin/grx20.o file.
Finally, I've started playing with some of my .pas files from an older version of gpc. Several contain the following, because I need to be particular about data types (in one program, I need a roughly 128MB 3D array of byte, so I can't afford to use 2-byte integers instead!): Type shortint = __byte__ integer; byte = __unsigned__ shortint; int16 = __short__ integer; word = __unsigned__ int16; UI = __unsigned__ integer; {32-bit unsigned integer for MT} LI = __long__ integer; {64-bit integer for statistics} Quad = __long__ real;
The compiler complains about this: identifiers should not start with an underscore, should not end with an underscore, and should not have two consecutive underscores in them. But this is what I've done ever since I started using gpc, and it is what the example programs did! Has the syntas changed? Also, why is "real" no longer accepted as a type?
thanks in advance, Toby