"Robert P. Ewing" a écrit :
Hello, all.
The saga continues...
Maurice asked what I meant by reconciling the directories. In the grx23s.zip is his directory at agnes, ../include has many subdirectories. Many of these, such as src, contrib, lib, info, duplicated directories a few layers lower in the tree structure. The files, in general, also duplicated the files a few layers lower. So I took, for example, the files in his lib directory, and moved them to the ../lib directory. No files were lost in this process.
Wosh what a mess ! The fact that some directories have same name does not mean that they have to be merged. I understand that your djgpp root directory is c:\gpc then the right way to unzip _any_ djgpp package, which you have downloaded in some temporary directory, c:\install for example is to do
cd c:\gpc unzip32 c:\installs\grx232s.zip
... if you have the info-Zip unzipper which comes with djgpp or
cd c:\gpc pkunzip -d c:\installs\grx232s.zip
... if you have the pkzip package
Then every file go into proper place, and you _never_ have to move them elsewhere.
In the case of grx232 most of them goto inside a directory c:\gpc\contrib\grx232 and two inside c:\gpc\manifest
To compile the grx package
cd c:\gpc\contrib\grx232
edit the file makedefs.gnu which is there to have in line 21 INCLUDE_GPC_SUPPORT=y instead of INCLUDE_GPC_SUPPORT=n
then type
make -f makefile.dj2
the library and tests are compiled. The resulting library is in the directory c:\gpc\contrib\grx232\lib\dj2
then to check
cd test run the C test program which have been made there cd ..\pascal run the pascal test programs which have been made there cd bgi\demos same story
Then to use it from your own programs you have _either_ to
1 - edit your c:\djgpp.env file so that it contains the following sections, which enable gcc/gpc to find files at the place where they have been built:
[cpp] CPLUS_INCLUDE_PATH=%/>;CPLUS_INCLUDE_PATH%%DJDIR%/lang/cxx;%DJDIR%/include;%DJDIR%/contrib/grx232/include C_INCLUDE_PATH=%/>;C_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/contrib/grx232/include OBJCPLUS_INCLUDE_PATH=%/>;OBJCPLUS_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc OBJC_INCLUDE_PATH=%/>;OBJC_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc
[gcc] LIBRARY_PATH=%/>;LIBRARY_PATH%%DJDIR%/lib;%DJDIR%/contrib/grx232/lib/dj2
[gpcpp] C_INCLUDE_PATH=%/>;C_INCLUDE_PATH%%DJDIR%/lang/pascal;%DJDIR%/include;%DJDIR%/contrib/grx232/include
[gpc] COMPILER_PATH=%/>;COMPILER_PATH%%DJDIR%/bin LIBRARY_PATH=%/>;LIBRARY_PATH%%DJDIR%/lib;%DJDIR%/contrib/grx232/lib/dj2
2 - _or_ to move the file c:\gpc\contrib\grx232\lib\dj2\libgrx20.a into the c:\gpc\lib directory the files contained in c:\gpc\contrib\grx232\include into c:\gpc\include
(don't do both !) but I suggest you use only the first method until you really understand djgpp principles
I've since taken Maurice's advice and added a few files from the djgpp distribution that I didn't already have, such as those in djdev203.zip. (I already had the binutils and a few others). I now have a file ../include/sys/version.h, for example, so compilation is no longer hanging there.
I've tried compiling now (with the new files) 3 different ways:
- under PENG, I get an error message: mkdir (done)
too many parameters: c:\gpc\bin/i386-pc-go32
- under RHIDE, the compiler crashes, saying
c:\gpc/lib/gcc-lib/djgpp/2.952/gpc1.exe c:/gpc/tmp/RHaaaaaa\ccbaoxkg.i -quiet -dumpbase diffus13.pas -g -version -famtmpfile=c:/gpc/tmp/RHaaaaaa... ignoring AutoMake options '-g -v'; (using '-g -v') GNU Pascal version 2.95.2 19991024 (release) (djgpp) compiled by GNU C version 2.95.2 19991024 (release). Exiting due to signal SIGSEGV Page fault at eip=001812e2, error 0004 eax=ff5a0010 ebx=001812e2 ecx=ff593beo edx=54637281 esi=ff58ef24 edi=00000000 ebp=00386738 esp=00386720 program=c:/gpc/lib/gcc-lib/djgpp/2.952/gpc1.exe sel=0247 base=862fb000 limit=ff62afff [...] app stack: [00388d7c..00208d7c] Exceptn stack: [00208c88..00206d48] Call frame traceback EIPs: [...] There were some errors
If needed, I can give the rest of the codes here.
- under command-line compilation, with --automake -v, I get the same
error and crash as under RHIDE.
Any guesses?
Toby