Frank Heckenbach a écrit :
I must admit that I don't really speak French, but as far as I can understand, you can compile a program that uses CRT once succesfully, but not twice. Yes, this is a known problem with GPC's `automake' under DJGPP, and it affects all units, not just CRT. We'll try to fix it soon, but until then, you'll probably have to delete crt*.o before each compilation, or use the `--autobuild' switch. Both will force CRT to be recompiled, and then the problem does not appear.
Perfec. If I delete crt.o or crt.gpi, it's working fine. But I work on rhide and when I clic on build or on make, rhide call in both case --automake. While the unit problem is not fixed, I will delete crt.gpi . To do it automaticaly, I wrote a little program gpc.com (100 bytes) how delete crt.gpi and call gpc.exe. Under DOS, it's easy because the file .com is executed before an .exe file. The source gpc.asm is at the end of this message. Just put the gpc.com in the %DJDIR%BIN. I dont use the djgpp.env because I will not use this program when the unit problem will be fixed.
Of cours if somebody dosen't have nasm and don't want to use it, I will send a mail with the gpc.com, but give me your %DJDIR% and the file(s) to delete before calling gpc.
I just tried it under Linux with the following line (note: the `$(LIBRARIES)' and `$(RHIDE_LIBS)' are also omitted because GPC cares about the libraries itself), and it seemed to work:
RHIDE_COMPILE_LINK_PASCAL_AUTOMAKE=$(RHIDE_LD_PASCAL) $(RHIDE_LIBDIRS) $(RHIDE_LDFLAGS) -o $(OUTFILE) --automake $(RHIDE_GPC_FLAGS) $(SOURCE_NAME) $(RHIDE_LDFLAGS)
Frank
The one I tried didn't work, but this one is fine. Thanks.
I want to thank's all the developpers because this time evrything is working! I'm happy.
Olivier PX
------------------------ file gpc.asm -----------------------------
;**************************************************************************** ;* * ;* GPC.COM * ;* * ;* This program can pass througt the gpc 19990430 's bug when compiling * ;* with units. It is call before gpc (because it is a .COM) and delete some * ;* units. * ;* * ;* Use: put this program in %DJDIR%BIN. It assume that %DJDIR% is * ;* \DJGPP\ else you have to change this name in the program * ;* * ;* To assemble: it's optimized for Nasm * ;* * ;* Author: Olivier PECHEUX * ;* Date: 9 June 1999 * ;* http: //www.multimania.com/opecheux * ;* mail: opecheux@multimania.com * ;* * ;****************************************************************************
[BITS 16] [ORG 0x0100] ; Programm .COM
[SEGMENT .text] jmp begin ; Begin of the "resident part" while calling gpc finish:
; Call gpc.exe mov ax,cs ; put the right segment in the block of parameters mov [CS_1],ax mov [CS_2],ax mov [CS_3],ax mov bx,parameters_block ; ES:BX aim the parameter's block mov dx,name_gpc_exe ; DS:DX aim on the name of gpc mov ax,4b00h ; DOS: execute a programm int 21h
; Finish the programm mov ax,4c00h int 21h
; Name of the gpc.exe programm name_gpc_exe db '\djgpp\bin\gpc.exe',0
; Parameters'block for gpc.exe parameters_block: dw 0 ; Same environment block dw 80h ; Same command parameters (offset) CS_1: dw 0 ; (segment) dw 5Ch ; First FCB (offset) CS_2: dw 0 ; (segment) dw 6Ch ; Second FCB (offset) CS_3: dw 0 ; (segment) begin:
;**************************************************************************** ;* Kill the units file * ;**************************************************************************** ; For killing other file, copy this block and change the name of the file to ; kill. ; Kill the crt.gpi file mov ah,41h ; DOS: kill file mov dx,name_crt_gpi ; DS:DX aim the asciiz name int 21h jmp end_crt_gpi ; Jump for putting the name with the code name_crt_gpi: db 'crt.gpi',0 end_crt_gpi: ;****************************************************************************
; Let some free memory mov ah,4ah ; DOS: let the memory mov bx,begin+215 ; keep around 200 byte of stack shr bx,4 int 21h
; Fix the new stack pointer mov sp,begin+200
; Call gpc.exe and finish jmp finish