Hi, Maurice
You wrote
Toby Ewing wrote: ... But when I
compile (alt-c c) I get: Error: module/unit interface 'Grx20' could not be imported When I make (F9), I get: Error: module/unit interface 'Grx20' could not be compiled
Where have you put the file libgrx20.a ? There is a {$L grx20} instruction in grx.pas which loads it if it finds it in some standard place. It should be on the %DJDIR%\lib directory, or its location can be given in the djgpp.env file or explicitly by a -L option while compiling.
Interesting... a search on the hard disk reveals nothing named libgrx20.a. The closest I have is a libgrx.h, in /djgpp/contrib/grx243/src/include. I don't suppose that's the one I want? Where would I find libgrx20.a, if it's not included in the grx download?!
An other possibility is that you have used an old main program. At some point the unit import file has ben renamed from grx20.pas to grx.pas.
Thanks for pointing this out. I hadn't caught this. Yes, unit is just grx.pas, so I have renamed my import call. The message I get now is:
cannot find -lgrx20 {or cannot find -lgrx, if that's how I list the library} ld returned 1 exit status
Toby
Toby Ewing wrote:
Hi, Maurice
You wrote
Toby Ewing wrote: ... But when I
compile (alt-c c) I get: Error: module/unit interface 'Grx20' could not be imported When I make (F9), I get: Error: module/unit interface 'Grx20' could not be compiled
Where have you put the file libgrx20.a ? There is a {$L grx20} instruction in grx.pas which loads it if it finds it in some standard place. It should be on the %DJDIR%\lib directory, or its location can be given in the djgpp.env file or explicitly by a -L option while compiling.
Interesting... a search on the hard disk reveals nothing named libgrx20.a. The closest I have is a libgrx.h, in /djgpp/contrib/grx243/src/include. I don't suppose that's the one I want? Where would I find libgrx20.a, if it's not included in the grx download?!
You have to compile and install grx after download. It does not contains the binaries, in particular the file libgrx20.a will be created in /djgpp/contrib/grx243/lib/dj2 and installation will move it into the /djgpp/lib directory.
In summary - edit the the file /djgpp/contrib/grx243/makedefs.grx at least set INCLUDE_GPC_SUPPORT=y and probably set a GRX_DEFAULT_FONT_PATH
- cd /djgpp/contrib/grx243 make -f makefile.dj2 it will compile everything, library and also C and pascal tests
- these tests can be run in place before installing in going to the test and pascal subdirectories (and bgi subdirectories of them)
- if you are satisfied cd /djgpp/contrib/grx243 make -f makefile.dj2 install will install libgrx20.a and some C header files (.h)
- if you have defined a GRX_DEFAULT_FONT_PATH cd /djgpp/contrib/grx243/src make -f makefile.dj2 install-fonts this step could be included in the previous one but it has not been done. Without it the fonts will remain in the /djgpp/contrib/grx243/fonts directories and you have to set explicitly a GRX_FONT_PATH in the environment (may be in the djgpp.env file). This relics of the past is too wierd to keep, except if you plan to run your programs on different computers with different font pathes.
Similarly to use grx with pascal in your own programs you will have to copy the unit import files grx.pas and bgi2grx.pas into a directory where gpc can find it, either in your favorite unit directory or in the standard gpc directory /djgpp/lib/gcc-lib/djgpp/<version>/units Maurice