Hi,
I know this isn't strictly a GPC question, but I thought someone here might be able to help with this:
I recently installed the following version of Dev Pascal from gnu-pascal.de, under Windows XP:-
Dev+GNU Pascal 1.94.2 + GPC 20040516 + Mingw runtimes + GCC support files (9.8mb: Win32 GUI self-extracting installer; 29 May 2004)
The problem I am getting is that I am not able to click on compilation error message in the Compiler window at the bottom to take me to the corresponding line in the source. Also, sometimes, error message produced by the compiler are not even reproduced in the Compiler window.
I suspect that this is because the IDE is not correctly parsing the compiler output and so does not actually know the location of the error.
e.g. here is a Compiler window output with errors:
Line/ ... | Unit | Message | f | Project2.pas:3: (Each undeclared identifier is reported only once | f | Project2.pas:3: for each routine it appears in.) | f | Project2.pas:3: undeclared identifier `y' (first use in this routine) | f | Project2.pas:5: syntax error before `:'
As you can see, the line number of the error is clearly visible in the Message column, but not in the Line column! (This was for compiling a console application, btw).
Of course, this isn't much of a problem to a seasoned programmer, however, I would like to use this IDE for a college course teaching Pascal to complete beginners and so it would be extremely useful if this feature worked properly.
Any advice (including alternative IDEs for standard non-extended Pascal) most appreciated.
cheers, ian
On 13 Aug 2004 at 14:34, Ian Miller wrote:
Hi,
I know this isn't strictly a GPC question, but I thought someone here might be able to help with this:
I recently installed the following version of Dev Pascal from gnu-pascal.de, under Windows XP:-
Dev+GNU Pascal 1.94.2 + GPC 20040516 + Mingw runtimes + GCC support files (9.8mb: Win32 GUI self-extracting installer; 29 May 2004)
The problem I am getting is that I am not able to click on compilation error message in the Compiler window at the bottom to take me to the corresponding line in the source.
Yep, that is sometimes a hit and miss affair :-(. See below ...
Also, sometimes, error message produced by the compiler are not even reproduced in the Compiler window.
I suspect that this is because the IDE is not correctly parsing the compiler output and so does not actually know the location of the error.
Yes. The difficulty is that the compiler error messages often run into several lines, many of which are part of the same error. It sometimes gets a bit difficult to do something with them in the IDE.
e.g. here is a Compiler window output with errors:
Line/ ... | Unit | Message | f | Project2.pas:3: (Each undeclared identifier is reported only once | f | Project2.pas:3: for each routine it appears in.) | f | Project2.pas:3: undeclared identifier `y' (first use in this routine) | f | Project2.pas:5: syntax error before `:'
As you can see, the line number of the error is clearly visible in the Message column, but not in the Line column!
Yep.
(This was for compiling a console application, btw).
Of course, this isn't much of a problem to a seasoned programmer, however, I would like to use this IDE for a college course teaching Pascal to complete beginners and so it would be extremely useful if this feature worked properly.
So far, this has been the best that I could do with it. The code was inherited from other people, and was originally written for the FreePascal compiler. It has been a major effort to get it to this stage. The problem you highlight has not been one of my major priorities in porting the IDE to support GPC, and I am still trying to understand what many parts of the original code are actually trying to do, and why they were implemented that way. I could of course do with some help in improving this code even further. The source code is available on the same page as the binaries, and you are welcome to help improve it ;)
If you send me a copy of the code that produces these lines that you have referred to, perhaps I could give this issue some more attention ...
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
Prof A Olowofoyeku (The African Chief) wrote:
Yes. The difficulty is that the compiler error messages often run into several lines, many of which are part of the same error. It sometimes gets a bit difficult to do something with them in the IDE.
For this purpose GPC inserts an additional space in the continuation lines:
foo.pas: In main program: foo.pas:4: undeclared identifier `sdf' (first use in this routine) foo.pas:4: (Each undeclared identifier is reported only once foo.pas:4: for each routine it appears in.) ^
Frank
On 13 Aug 2004 at 20:04, Frank Heckenbach wrote:
Prof A Olowofoyeku (The African Chief) wrote:
Yes. The difficulty is that the compiler error messages often run into several lines, many of which are part of the same error. It sometimes gets a bit difficult to do something with them in the IDE.
For this purpose GPC inserts an additional space in the continuation lines:
foo.pas: In main program: foo.pas:4: undeclared identifier `sdf' (first use in this routine) foo.pas:4: (Each undeclared identifier is reported only once foo.pas:4: for each routine it appears in.) ^
Thanks for the tip. I actually discovered that the parsing code was doing strange things in places (the places that I introduced to cater for GPC's error reporting format). I never really bothered much to do anything with this part of the code after some initial forays about 2 years ago. I have given it a good look today and have given it a serious facelift.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
Ian Miller a écrit:
Any advice (including alternative IDEs for standard non-extended Pascal) most appreciated.
RHIDE works very well for that purpose, and also for integrated debugging, together with the GPC compiler. But it is for DOS applications with the DJGPP system (instaed of mingw). It is usually run in a Windows DOS box. The only drawback I see is the old looking text mode screen, with only 50x80 lines x column resolution !
I use also a more comfortable editor: a shareware TextPad. Very low priced, but this can be a problem in a school. It can easily be parameterized to launch the compiler and parse correctly the resulting error messages. But it has no integrated debugger, and a line debugger like gdb is really a nightmare.
While we are discussing, I have seen that more recent versions of Blodshed do begin to have a decent integrated debugger for C C++. The adaptation to pascal will probably have to wait some time, given the answers of the Chief to your message.
Maurice
On 13 Aug 2004 at 20:40, Maurice Lombardi wrote:
[...]
While we are discussing, I have seen that more recent versions of Blodshed do begin to have a decent integrated debugger for C C++. The adaptation to pascal will probably have to wait some time, given the answers of the Chief to your message.
Are you talking about the Insight debugger? If so, it seems like just gdb with a friendly face.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
Prof A Olowofoyeku (The African Chief) a écrit:
On 13 Aug 2004 at 20:40, Maurice Lombardi wrote:
[...]
While we are discussing, I have seen that more recent versions of Blodshed do begin to have a decent integrated debugger for C C++. The adaptation to pascal will probably have to wait some time, given the answers of the Chief to your message.
Are you talking about the Insight debugger? If so, it seems like just gdb with a friendly face.
Yes, and this is also what is done in RHIDE, which contains an embedded gdb. But it is a great advantage to step inside source code instead of printing each time the stop line and having to look into the source what is around.
Maurice
On 14 Aug 2004 at 11:49, Maurice Lombardi wrote:
[...]
Are you talking about the Insight debugger? If so, it seems like just gdb with a friendly face.
Yes, and this is also what is done in RHIDE, which contains an embedded gdb. But it is a great advantage to step inside source code instead of printing each time the stop line and having to look into the source what is around.
The Insight debugger (a GUI interface to gdb) should support Pascal as well (well, I tried it a while ago (under Cygwin), and it worked "somewhat" :)). The Bloodshed C++ debugger stuff looks to me line plain old commandline, gdb hooked into by the IDE. It would be interesting to see how their IDE hooks into the commandline gdb, but trawling through the C++ code does not appeal to me in the slightest. The original Delphi code for the Pascal IDE was difficult enough to figure out ...
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/