Olivier PECHEUX wrote:
Dimitri, tu dis :ça marche. Chez Maurice, ça marche. (unité crt).
Chez moi, ça ne marche que la première fois. Ce que j'ai fait:
- j'ai chargé le curse23.zip (indiqué par Maurice).
- j'ai supprimé le specs et le djgpp.djl
- j'ai modifié le djgpp.env (indiqué par Olivier = moi)
_ j'ai tapé le programme:
program efface; uses crt; begin clrscr; readln end.
Quand je compile la première fois, tout se passe bien, et le programme fonctionne. Si je compile une deuxième fois, je retrouve le messsage undefined reference to crt_clrscr. Dans mon répertoire de travail, j'ai les fichiers gpc.o gpc.gpi crt.o crt.gpi et crtc.o . le fichier crtc.o contient bien la procédure crt_clrscr (vue par nm -O crtc.o >crtc.lst). Si je supprime lun des trois fichiers crt.gpi gpc.gpi ou crt.o , la compilation fonctionne à nouveau.
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.
Dans le fichier crtdummy.c (dans units), il est dit:
- add a statement to #include that file, together with suitable #ifdefs
in crtc.c
This statement only refers to those who want to port CRT to a new system (say, mingw). If you just want to use CRT under DJGPP, you don't need to worry about it.
The link to the last djgpp version of gpc in the directory gnu-pascal/djgpp on agnes is not correct: instead of gpc20bb -> ../binary/gpc-19990530-i386-pc-djgppv202.zip it should be gpc20bb -> ../beta/binary/gpc-19990530-i386-pc-djgppv202.zip
Quel est le nom exact complet? Dans ftp://agnes.dida.physik.uni-essen.de/gnu-pascal je ne vois pas de djgpp. le gpc20bb.zip que j'ai pris est tiré de : ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/current/binary/gpc-19990430-i386-pc-djgppv202.zip . Ai-je pris le mauvais fichier?
The `19990530' was a typo. 19990430 is the correct name of the last binary release for DJGPP.
To overwrite such a builtin specs, provide a new one in a rhide.env file (either the global one in %DJDIR%/share/rhide/ or a local one in the current directory). In you specific task you should place a line like the following:
RHIDE_COMPILE_LINK_GPC_AUTOMAKE=$(RHIDE_LD_PASCAL) $(RHIDE_LIBDIRS) -o $(OUTFILE) -automake $(RHIDE_GPC_FLAGS) $(SOURCE_NAME) $(LIBRARIES) $(LDFLAGS) $(RHIDE_LDFLAGS) $(RHIDE_LIBS)
(NOTE here, this should be all ONE long line!!!)
J'ai effectivement bien la spec indiquée. Je ne commprends pas bien ce que je dois faire avec la fameuse ligne. Je l'ai mise seule dans un fichier rhide.env mis dans les deux répertoires indiqués sans aucun changements.
I'm not sure if I understand you correctly here, but if your problem is that there is no rhide.env file, then just create it in one of the directories mentioned, and put just this one line into it.
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
-- Frank Heckenbach, frank@fjf.gnu.de, http://fjf.gnu.de/ GPC To-Do list, latest features, fixed bugs: http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html
Frank Heckenbach wrote :
I must admit that I don't really speak French,...
Frank
Hi,
I make a mistake, excuse-me. There is a french list on Pascal (prog_pascal_gnu on www.onelist.com)and I wanted to sent to this french one. This is the reason why it was written in french.
Some friend says "that work" but I had the problem with the second compilation. Thank's for the answer.
Olivier.
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