From: ryot AT bigfoot DOT com (George Ryot) Newsgroups: comp.os.msdos.djgpp Subject: Re: Basic problem? 'endl' is already declared in this scope Message-ID: <37fb3509.33217536@news.clara.net> References: <37F8B3D3 DOT A6FBCFA5 AT gmx DOT de> X-Newsreader: Forte Agent 1.5/32.452 X-No-Archive: yes MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 40 Date: Mon, 04 Oct 1999 23:18:08 GMT NNTP-Posting-Host: 195.8.92.136 X-Complaints-To: abuse AT clara DOT net X-Trace: nnrp3.clara.net 939079088 195.8.92.136 (Tue, 05 Oct 1999 00:18:08 BST) NNTP-Posting-Date: Tue, 05 Oct 1999 00:18:08 BST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Roland Ortloff wrote: > I'm really depressed because something doesn't > work which actually should in my opinion: > > Compiling following code under Windows 96 > (djgpp gcc V2.95, stlport V3.2.1) with That could be the problem, you might have better luck with gcc 2.8.1, I understand that combination works (not sure about DJGPP). > gcc -Ic:/djgpp/stlport -c iotest.cpp I get the > following error message: > > In file included from iotest.cpp:49: > c:/djgpp/stlport/iostream:76: `endl' is already declared in this scope > c:/djgpp/stlport/iostream:77: `ends' is already declared in this scope > c:/djgpp/stlport/iostream:80: `flush' is already declared in this scope > > > It seems that both iostreams are used, > the regular one and the one from stlport. I think that's what is supposed to happen, the stlport headers include the gcc headers. This works because of the -I on the command line. > Using namespace stlport doesn't help. The errors you quote occur before that line. > What am I doing wrong. I'm new to that all > so I'd be happy about any help. It is difficult to see what is wrong from what you posted, but the problem seems more likely to be in the header rather than your code. Maybe you can try a simple hello world program then cut-n-paste the source here together with the commands used to compile and any errors. -- george