Djgpp Error
Contents |
there are so many that I can't keep up. How can I redirect them to a file? Q: When I add -v to the GCC command line, how internal compiler error killed (program cc1plus) can I put all the voluminous output into a file, so I
Gcc Internal Compiler Error Killed (program Cc1)
don't miss anything when reporting a problem? Q: I have this nifty graphics program which bombs from time to time, but the registers and traceback info are hidden by the graphics display. How can I see it? A: Error messages are usually written to stderr, and stock COMMAND.COM cannot redirect it. There are several alternatives to do that: You can use a shell smarter then COMMAND.COM, such as 4DOS or bash, which knows how to redirect standard error stream to a file. 4DOS is shareware and can be found on SimTel.NET, while bash is available from the v2gnu directory of DJGPP archives on SimTel.NET. You can also run your program under any one of the programs which save all screen output of programs they spawn in a file. I suggest using a program called SCRIPT, which is similar to its Unix namesake. It has an advantage of saving everything which goes to screen and showing it on the screen at the same time. You can find SCRIPT on SimTel.NET. Or you can use the REDIR program which comes with DJGPP. It also redirects standard output and/or standard error to a file, but you don't get a chance to look at the output while the program runs. Here's how to run GCC with REDIR: redir -o gcc.log -eo gcc -v ... (put the rest of the GCC command line instead of the dots). The messages printed by GCC will be written to the file gcc.log. Windows/NT has its own program named redir.exe, so make sure the DJGPP's bin subdirectory is listed in the PATH variable before the NT directories. webmaster donations bookstore delorie software privacy Copyright © 2001 by Eli Zaretskii Updated Apr 2001
so DJGPP programs should in general run fine under NT (but see the list of possible problems below). The DPMI server built into NT (and Windows 9X) loses selectors with each child program that is invoked by a DJGPP program, so after about two thousand calls to functions from the spawnXX family you can see an error message like this: Load error: no DPMI selectors Some versions of NT lose DOS memory instead of selectors, so you might see another error message: Load error: no DOS memory These problems are likely to afflict only DJGPP ports of Unix shells (such as bash), since no other DJGPP program, not even Make, is likely to call so many child programs before it exits. The only known work-around is to exit http://www.delorie.com/djgpp/v2faq/faq6_15.html the shell every now and then, because when all the available selectors are exhausted, the DOS box will crash. I'm told that Make sometimes fails on long Makefiles on Windows 9X, where the selectors are lost at even higher rate than on NT. If you ever run a very long Makefile and see Make crash, just run Make again, and it will pick up where the crashed session has left off. The long filename API (the special functions of http://www.delorie.com/djgpp/v2faq/faq3_3.html Int 21h which support file names longer than the DOS 8+3 limitation) for DOS box is not supported by current versions of Windows/NT, so you cannot have long filenames there from DJGPP programs. An alpha version of an LFN driver for NT which enables long file name support for DJGPP programs, written by Andrew Crabtree and significantly improved by Wojciech Galazka, can be downloaded the Web. The popular DJGPP IDE RHIDE needs a -M switch to work on NT (to disable the mouse support which will otherwise crash RHIDE). Version 1.4.7b or RHIDE reportedly solves this problem and allows the mouse to be used on NT. Also, one user reported that he had to type rhide twice to enter RHIDE, because the first invocation immediately exits back to the command-line prompt with no message, if you don't disable the mouse with -M. You might have problems with using the SVGA modes of your video card under Windows/NT; only standard VGA modes (including mode-X) work. That is because NT doesn't allow arbitrary direct access to the SVGA registers, without which it is impossible to recognize the type of the SVGA and employ its capabilities. For example, a user reported that GRX functions and the MODETEST.EXE program thought that only a standard VGA was installed, whereas he had an S3 card. There is nothing you can do about this feature of Windows/NT; that is the price you
10/07/2004 10:45 AM When I try to compile a program with DJGPP (tried this https://www.allegro.cc/forums/thread/415579 with clean installations of both versions 3.2 and 3.4), I get http://cboard.cprogramming.com/a-brief-history-of-cprogramming-com/5307-djgpp-error-checking-inside-rhide.html the following message:gcc.exe installation problem, cannot exec 'cc1plus': No such file or directory (ENOENT)Allegro compiles fine; this appears to be just an issue with the c++ compiler. Kirr Member #5,060 September 2004 Posted on 10/07/2004 10:51 AM Did you install both gcc internal compiler and gpp packages? --"Go to the NW of Stonemarket Plaza to the Blue Glyph Keeper Library door and enter."- Lunabean's Thief Deadly Shadows Walkthrough, day eight Dark Nation Member #1,642 November 2001 Posted on 10/07/2004 12:31 PM Yep. Here are the ones I got:bnu215djdev203faq230gcc341gdb611gpp342mak3791objc342pakk023rhide15sed412txi47All were extracted by order of date into an initially internal compiler error empty c:\djgpp folder. My path statement include c:\djgpp\bin. The djgpp environment variable is set to c:/djgpp/djgpp.env (I've even tried with backslashes instead, but there was no difference). I even tried running 'setdjgpp c:\djgpp\djgpp.env c:/djgpp/djgpp.env' but that didn't help, either. The faq said to look in the problems.txt file to find out how to modify the djgpp.env file to allow gcc to find the cc1plus program, but there is no problems.txt file in the djgpp folder (or anywhere on my computer). ReyBrujo Moderator January 2001 Posted on 10/07/2004 12:39 PM I think what you did here: setdjgpp c:\djgpp\djgpp.env c:/djgpp/djgpp.env is bad. Try setdjgpp c:\djgpp c:/djgpp instead (it has been a couple of years since I last tried it). --RBε εγγγγγγ β¦ε₯ͺγε΄γ«εγγγ¨ζγ£γγ γγγMitsuko's last words, Battle Royale Dark Nation Member #1,642 November 2001 Posted on 10/07/2004 12:46 PM Looking back, I think that's actually what I did, but I tried it again and still no dice. Even tried switching the 2 arguments. edit
Boards A Brief History of Cprogramming.com DJGPP error checking (inside RHIDE) Getting started with C or C++ | C Tutorial | C++ Tutorial | C and C++ FAQ | Get a compiler | Fixes for common problems Thread: DJGPP error checking (inside RHIDE) Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 11-15-2001 #1 VirtualAce View Profile View Forum Posts Super Moderator Join Date Aug 2001 Posts 9,608 DJGPP error checking (inside RHIDE) Found that sometimes my code will run inside of RHIDE, but will not outside of it. For instance, I overran the bound of an array by one element. It ran fine within RHIDE, but caused a page fault outside of it. Why? I know that the compiler will not catch stupid errors like array overruns because that is my responsibility as the programmer, but why didn't the overrun crash the system from within RHIDE? Even the stdout display did not indicate an error. This is not very comforting. Let's say I develop a large program and make the same mistake in the early stages. If it runs fine within the IDE, I will assume everything is OK when in fact it is not. This discrepancy will make it hard to debug programs since I will have to periodically run the exe from the command line to test it in a non-RHIDE environment. Anyone else experience this with DJGPP and RHIDE? Quick Navigation A Brief History of Cprogramming.com Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums General Programming Boards C++ Programming C Programming C# Programming Game Programming Networking/Device Communication FAQ Board Programming Book and Product Reviews Platform Specific Boards Windows Programming Linux Programming Cprogramming.com and AIHorizon.com's Artificial Intelligence Boards General AI Programming Community Boards Article Discussions Tech Board General Discussions A Brief History of Cprogramming.com Contests Board Projects and Job Recruitment « Previous Thread | Next Thread » Popular pages Exactly how to get started with C++ (or C) today C Tutorial C++ Tutorial 5 ways you can learn to program faster The 5 Most Common Problems New Programmers Face How to set up a compiler 8 Common p