Hi!
Thanks for your reply!
Mr. Veli Suorsa wrote
I use latest Rhide and it works fine with Gnu C/ C++ and Fortran compiler. Some new features are still hoped ;-).
I have tried to install GPC to Dos / Djgpp (from download sites a zip-file, >gpc20bb.zip).
Can You help me, because I need pascal to my test and Gpc compiler don't works? Or can you tell me who can solve this problem! I have read your instructions and done all right, but they are not good enough to succeed installation in Dos / Djgpp.
What should I do?
What have you done exactly ? From where have you downloaded gpc20bb.zip: may be outdated.
I first download GPC from mirror sites: ftp://ftp.funet.fi/pub/mirrors/simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/gpc20bb.zip
It does not work with latest Rhide and Dos/ Djgpp.
I tried (with Big African Chief help) sites: ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/djgpp/gpc20ab.zip
It does not work with Rhide, neither.
And I got a new download- siteaddress from CloseBSD, which works: ftp://agnes.dida.physik.uni-essen.de/home/maurice/gpc2952b.zip
What exactly does not work and what are error messages ?
I saw from Rhide screen command: gpc -o pay3_4.exe --automake="-g" -g pay3_4.pas -lgpc -lm
before editing djgpp.env file. and error message was like: ... undefined reference to '-p-inoutres' ... collect2: ld returned 1 exit status
Adviced GPC version works with Rhide Menu in two parts: -compiler and -make, not yet -Build all. Can you tell me why -Build all does not works?
gpc -g -c pay3_4.p -o pay3_4.o
works, ...
and make: gcc -o pay3_4.exe pay3_4.o -lgpc -lm
works, too.
I had to do some adds/ changes to djgpp.env file like:
[gpc] COMPILER_PATH=%/>;COMPILER_PATH%%DJDIR%/bin
[rhide] RHIDE_TYPED_LIBS_DJGPP.p=gpc m RHIDE_TYPED_LIBS_DJGPP.pas=gpc m PASCAL_TYPE=GPC RHIDE_LD_PASCAL=gcc RHIDE_COMPILE_GPC=$(RHIDE_GPC) $(RHIDE_GPC_FLAGS) $(LOCAL_OPT) -c $(SOURCE_NAME) -o $(OUTFILE) RHIDE_COMPILE_LINK_GPC=$(RHIDE_LD_PASCAL) $(RHIDE_LIBDIRS) $(C_EXTRA_FLAGS) -o $(OUTFILE) $(OBJFILES) $(LIBRARIES) $(RHIDE_LDFLAGS) $(LDFLAGS) $(RHIDE_LIBS)
RHIDE_COMPILE_LINK_PASCAL_AUTOMAKE=$(RHIDE_COMPILE_LINK_$(PASCAL_TYPE))
And so on... You can see all these Rhide variables from saved *.mak file. I really hope that someone do a good installation program (and instructions, too) for these variables.
My test program (pay3_4.p, that you have seen before) size of .exe file (436 kb) is 3 times larger than Fortran (150 kb). Strip helps to 300 kb, but is there anywhere a better optimizer? I really think that someone can do it with assembler within 1 KB.
Thank you very much and see you soon!
Veli Suorsa --- "People must believe to the future to be able to live!" ---------------------------------- J.V.Snellman, 1890.
Oulu, FINLAND Mailto:VJSuorsa@Surfeu.Fi http://members.surfeu.fi/veli.suorsa/ http://www.surfeu.fi
Mr. Veli Suorsa wrote:
I first download GPC from mirror sites: ftp://ftp.funet.fi/pub/mirrors/simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/gpc20bb.zip
slightly outdated, but should work
I tried (with Big African Chief help) sites: ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/djgpp/gpc20ab.zip
This is completely outdated. works only with gcc-2.8.1 (which is included in the same directory). Better forget and upgrade.
It does not work with Rhide, neither.
Normal if you have gcc2952
And I got a new download- siteaddress from CloseBSD, which works: ftp://agnes.dida.physik.uni-essen.de/home/maurice/gpc2952b.zip
OK. I try to always give under this same link the lastest gpc snapshot I have compiled, and which give zero error when running the whole test suite.
What exactly does not work and what are error messages ?
I saw from Rhide screen command: gpc -o pay3_4.exe --automake="-g" -g pay3_4.pas -lgpc -lm
There is no need for options to automake now, and you get a warning.
before editing djgpp.env file. and error message was like: .... undefined reference to '-p-inoutres' .... collect2: ld returned 1 exit status
Adviced GPC version works with Rhide Menu in two parts: -compiler and -make, not yet -Build all. Can you tell me why -Build all does not works?
The build option in rhide is intended for C programming. Rhide looks to all the files in the project and force their recompilation (presumably by deleting the corresponding .o (and .exe) files, I am not sure). The logic in pascal is different: there is no real need for a project because the dependencies are contained in the uses clauses inside of the pascal programs and units. (C cannot do that way because dependencies are usually dealt with with header files (.h) and that there is no uniquely defined link between a header file and the .c files which contain the actual C code). Practically nobody includes then in a pascal project all files needed (especially the standard files contained in the "units" directory, the user frequently does not even know about, especially about their dependencies). This is quite convenient in practice, but rhide cannot delete all .o files that would be necessary because it does not know about the content of the pascal files, and anyway it noes not delete the .gpi and .gpm files it does not even know about. To force a build in pascal you need to replace --automake by --autobuild as compilation option. But this is nowhere provided for in rhide (and in particular is not done when you hit compile/build) because of the different logics: looking into the makefiles generated by rhide you have provision for RHIDE_COMPILE_LINK_AUTOMAKE but not for RHIDE_COMPILE_LINK_AUTOBUILD
From Dos command line Gpc compiler:
gpc -g -c pay3_4.p -o pay3_4.o
works, ...
and make: gcc -o pay3_4.exe pay3_4.o -lgpc -lm
works, too.
I had to do some adds/ changes to djgpp.env file like:
[gpc] COMPILER_PATH=%/>;COMPILER_PATH%%DJDIR%/bin
OK This is necessary.
[rhide] RHIDE_TYPED_LIBS_DJGPP.p=gpc m RHIDE_TYPED_LIBS_DJGPP.pas=gpc m
libgpc and libm are linked automatically now, so you can type simply RHIDE_TYPED_LIBS_DJGPP.p= RHIDE_TYPED_LIBS_DJGPP.pas= but this causes no harm
However in looking to my rhide makefiles (1.4.7.8) I see instead RHIDE_TYPED_LIBS_GPC=gpc m with I superseded in djgpp.env by RHIDE_TYPED_LIBS_GPC= You have probably an older version of rhide. Better upgrade.
PASCAL_TYPE=GPC
OK
RHIDE_LD_PASCAL=gcc
? for me it is gpc
RHIDE_COMPILE_GPC=$(RHIDE_GPC) $(RHIDE_GPC_FLAGS) $(LOCAL_OPT) -c $(SOURCE_NAME) -o $(OUTFILE) RHIDE_COMPILE_LINK_GPC=$(RHIDE_LD_PASCAL) $(RHIDE_LIBDIRS) $(C_EXTRA_FLAGS) -o $(OUTFILE) $(OBJFILES) $(LIBRARIES) $(RHIDE_LDFLAGS) $(LDFLAGS) $(RHIDE_LIBS)
RHIDE_COMPILE_LINK_PASCAL_AUTOMAKE=$(RHIDE_COMPILE_LINK_$(PASCAL_TYPE))
This is unnecessary since it is identical to the defaults contained in rhide. What is necessary is:
RHIDE_COMPILE_LINK_GPC_AUTOMAKE=$(RHIDE_LD_PASCAL) $(RHIDE_LIBDIRS) -o $(OUTFILE) --autobuild $(RHIDE_GPC_FLAGS) $(SOURCE_NAME) $(LIBRARIES) $(LDFLAGS) $(RHIDE_LDFLAGS) $(RHIDE_LIBS)
i.e. suppress options to automake to avoid those stupid warning messages, and probably replace --automake altogether by --autobuild. I am not sure that the latest replacement is still necessary. It was sometimes ago but I have not checked it recently. It increases compilation time, but it is more secure. An other convenient way is to use a compilation option --unit-destination-path= (better included automatically in the default rhide project if you work mainly in pascal) to put all .o .gpi .gpm files into a given directory, and to delete manually all the content of this directory when you want a rebuild (easy only if you work in a windows dos box not to need to exit from rhide each time you need to do that, or you can have a .bat file in your path to do that and do it by exiting temporarilly from rhide by hitting File/Dos shell). Anyhow be carefull that you have to delete all these files each time you upgrade to a new version of gpc.
Hope this helps,
Maurice
Maurice Lombardi wrote:
RHIDE_LD_PASCAL=gcc
? for me it is gpc
If this is used only for linking (don't know much about RHIDE's internals, but I suppose so), gcc should also work, but needs -lgpc and -lm explicitly. Better use gpc for linking, though.
Frank