Message-ID: <20030218200121.65350.qmail@web13001.mail.yahoo.com> Date: Tue, 18 Feb 2003 12:01:21 -0800 (PST) From: Thomas Tutone Subject: Re: Strange compiler errors To: djgpp AT delorie DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Reply-To: djgpp AT delorie DOT com "Klytu" wrote: > Yesterday, during the blizzard here in Northeast > U.S., I installed the > latest DJGPP package (2.03)along with RHIDE and > gcc3.2.1 . I compiled > a program of mine that compiled with no errors > under the previous > package (2.02) and got error messages indicating > that the functions in > were undefined. Without a short example (50 lines or less) that reproduces the errors and the exact text of the error, it is quite difficult to help. > I did not include directly but had the > following includes in my source: > > #include > #include > #include > #include [snip] > (A side problem I noticed is > that if I don't include , I get errors > indicating that cout > and cin are undefined. I thought including > after > is already included was redundant or am I wrong > about that? You're wrong about that. The standard requires that std::cout and std::cin be defined in . It is implementation-defined whether other headers indirectly include the common code to define std::cout and std::cin as well. If you don't need std:cout or std::cin and are only doing file i/o, then including should be sufficient. But if you need to use std::cin, std::cout, or std:cerr, then you must include for the program to be portable. [snip] > Basically everything was installed properly and I > changed > nothing (I might have changed the order of the > includes in my source, > but I am not sure). Suddenly everything compiles > with no errors now. I > would post the exact error messages I got if I > could remember them, > but suffice it to say that all the generated errors > were in indirectly > included files that were not in my source but in > the standard library. > Any explanation for this would be appreciated! If you can't reproduce the errors, it's hard to diagnose what the problem was. But it's possible you mixed deprecated and standard headers in the same program ( instead of for example), and that when you changed the order of the header files, you also corrected that error. But the blizzard's knocked out my crystal ball, so I don't know for sure. If the problem returns, post some code that reproduces it, along with the error messages. Best regards, Tom __________________________________________________ Do you Yahoo!? Yahoo! News - Today's headlines http://news.yahoo.com