-------- Message d'origine -------- Sujet: Re: to Maurice Lombardi Date: Thu, 30 Aug 2007 16:35:20 +0100 De: Maurice Lombardi Maurice.Lombardi@ujf-grenoble.fr A: Peintler peintler@chem.u-szeged.hu Références: 46D46DE1.2080208@chem.u-szeged.hu
Peintler a écrit:
Thank You for updating GRX library. I have compiled the libgrx20.a library from v2.4.8 sources now under both DOS v7.1, Win98SE/MinGW32 and XPSP2/Mingw32 (with gcc v3.4.4).
I use the same for my own works, with the last gpc alpha (20060325) and as backend gcc 3.2.3 with W98se/mingw32 and gcc 3.4.5 (candidate) with XPsp2/mingw32
I have discovered some small bugs and I suggest some improvements, concerning mainly the Pascal parts (the important modifications are attached):
- I have noticed a small error in GRX.PAS. Line 764 contains the
"No_color" variable name for a GrColor field, but the right name would be "Lno_color" comparing to line 1175 of GRX20.H file.
OK
- The compilation of JPGTEST.PAS does not require GPC.PAS, so "GPC, "
can be deleted form line 23 of the source file.
OK
- The majority of the Pascal programs cannot be compiled without two
changes: (1) the correct unit-paths must be given under Win32 (see line 52 in the attached makefile.grx) and (2) the dots must be erased in lines 53-56 of GRX.PAS since the libraries are not explicitly given in the makefiles.
(1) No, for the first compilation of the library (before installation) but this seems to indicate something wrong in your installation. The unit files grx.pas bgi/graph.pas (and test.pas) are found by the compiler because they are in the same directory as the main program which uses them. The library is called by the {$L }instructions in the beginning of the grx.pas and graph.pas files, and found in place before installation with the GRXLIBPATH = in the makefile.W32. After installation, for your own programs which are not in place, if you use the suggested (non standard) c:\mingw\unit directory, you need indeed a compilation option --unit-path=c:/mingw/units. Now, according to your makedefs.grx, you seem to have put instead these unit files in the directory c:\mingw\lib\gcc\mingw32\3.4.5\units where are the standard unit files which come with the gpc compiler (gpc.pas, crt.pas ...). This is possible (I have done it in installing the compiler for some other users in our lab: the only drawback is the need to move these files if you change the gcc backend version for gpc, the one with which gpc was compiled, not the main one with which your main gcc compiler was compiled), but in this case the compiler should find it without any --unit-path compilation option. You can check your installation by typing gpc --print-search-dirs In the libraries section you should find a path leading to the upper directory c:/mingw/lib/gcc/mingw32/3.4.5/, from which gpc computes the path of the standard units directory.
(2) right, the instructions to do so are contained in the readme file in the root of the grx directory, and some other places. This is probably not clear enough.
In fact I prefer to use the configure script which does simultaneously and consistently changes in makedefs.grx, grx.pas and graph.pas. For this you need to have installed MSYS and work under it. The grx win32 driver has been first made when MSYS did not exist, and mingw was not a self hosting system. Instructions were given to compile on a bare command.com DOS window, with mingw32-make, instead of the msys make. But the configure script is more convenient. Type configure --help to see the options, then configure ... with your options make make install These are the same standard instructions as for any package in unixes.
- The \TEST\BGI\FONTPLAY.C file includes the "gettimeofday" function
which does not exist in mingw32 distritbution, only under DOS. This file cannot be compiled under MinGW32 and the corresponding makefile.w32 did not include it in GRX version 2.4.6.
This is no more true: in recent versions of mingw gettimeofday() is declared in sys/time.h /* Implementation as per: The Open Group Base Specifications, Issue 6 IEEE Std 1003.1, 2004 Edition
The timezone pointer arg is ignored. Errors are ignored. */ int __cdecl __MINGW_NOTHROW gettimeofday(struct timeval *__restrict__, void *__restrict__ /* tzp (unused) */);
- Finally, the most strange experience: AR.EXE does not work under
MinGW32 with the original CROSS_PLATFORM="" setting if the command to be executed contains more than ~500 characters! Removing "" makes everything to be perfect.
Right: in fact we always use the configure script which deletes these "". Nevertheless I have corrected it in the last, just uploaded, version.
Maurice