From: Rudolf Polzer Newsgroups: comp.os.msdos.djgpp Subject: Internal compiler error - not covered by the FAQ Date: Tue, 24 Oct 2000 09:41:22 GMT Organization: Deja.com - Before you buy. Lines: 51 Message-ID: <8t3lg2$o6t$1@nnrp1.deja.com> NNTP-Posting-Host: 212.185.252.66 X-Article-Creation-Date: Tue Oct 24 09:41:22 2000 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) X-Http-Proxy: HTTP/1.0 spcss35. (IBM-PROXY-WTE), 1.1 x66.deja.com:80 (Squid/1.1.22) for client 212.185.252.66 X-MyDeja-Info: XMYDJUIDrpolzer To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I often get ICE's when compiling a 1000-line cpp file using many C++ headers like , , etc., especially when optimizing. I found out that the error rate depends on the amount of free DPMI memory (after setting DPMI mem to 64M in Windoze, it even crashed at one of the includes, while with 128M, everything mostly works). Also, since I compile from RHIDE, just restarting the compiler by pressing F9 sometimes make it work; if that does not help, closing the IDE with its DOS window and reopening helps; once I even needed to restart Windoze. Is there a way to prevent this other than reducing the size of the cpp files (ie splitting)? The objects in my game take up altogether 3000 lines of C++ code (not very much) and I had to split first to get back to 1000 lines each file, but now, after including a new header, I am faced with the same problem; but I cannot split any more without defining the classes in .H files. But they are not to be visible from other files! (ie a Player should not know what an Enemy is; encapsulation!). At the moment I have one base class that provides the essentials (no fat interface!) and many derived classes that are also derived from, and no part of the game knows what a Player is except the player itself (I only use general flags like ACCEPT_INPUT, IS_VULNERABLE or IS_SWITCHABLE); so it is not feasible to split further. Is there a solution (except buying more RAM)? Compiling in Linux works, but my f***ing sound card is not supported, as well as my scanner, my printer etc. and cross-compiling (or compiling for Linux) is also not feasible. And, as I discovered, DJGPP puts all standard library names into the global namespace, and recompiling in standard-compliant compilers fails. Is there a trick to always include the namespace std (or even better: to allow a std:: before an identifier causing no harm in DJGPP)? What happens if I do this: using namespace std; #include int main() { cout << "Hello World!" << endl; } in standard-compliant compilers? Do I need to define the namespace before? Must the using directive be after the includes? -- Rudolf Polzer Sent via Deja.com http://www.deja.com/ Before you buy.