re: cpp compile problems ? (Debian)

2005-08-17 Thread Peter
My g++ compiler seems to be misconfigured. It is gcc/g++ 3.3.3 from Debian and it cannot find simple things, like cout. Example: /usr/include/c++/3.3/iostream contains: extern ostream cout; My test program is: #include iostream int main( int argc, char *argv[] ) { cout

SOLVED (missing .h in #include statement) re: cpp compile problems ? (Debian)

2005-08-17 Thread Omer Zak
I reproduced your problem with my fully-functioning installation, with exactly the same error messages and with file containing exactly your example program. When I change from iostream to iostream.h, the compilation proceeds properly yielding a working executable, but with the following warning

Re: cpp compile problems ? (Debian)

2005-08-17 Thread Yedidyah Bar-David
On Wed, Aug 17, 2005 at 04:43:05PM +0300, Peter wrote: My g++ compiler seems to be misconfigured. It is gcc/g++ 3.3.3 from Debian and it cannot find simple things, like cout. Example: /usr/include/c++/3.3/iostream contains: extern ostream cout; My test program is: #include

Re: cpp compile problems ? (Debian)

2005-08-17 Thread Shachar Shemesh
Peter wrote: My g++ compiler seems to be misconfigured. It is gcc/g++ 3.3.3 from Debian and it cannot find simple things, like cout. Example: /usr/include/c++/3.3/iostream contains: extern ostream cout; My test program is: #include iostream You are using the unsuffixed iostream.

Re: cpp compile problems ? (Debian)

2005-08-17 Thread Peter
On Wed, 17 Aug 2005, Yedidyah Bar-David wrote: Any input will be welcome, thanks, Either add 'using namespace std' or #include the older iostream.h. I tried both std::cout and #include iostream.h. No go. I just tried to upgrade the C compiler but I am lost in dependency hell. I will work

Re: SOLVED (missing .h in #include statement) re: cpp compile problems ? (Debian)

2005-08-17 Thread Peter
On Wed, 17 Aug 2005, Omer Zak wrote: I reproduced your problem with my fully-functioning installation, with exactly the same error messages and with file containing exactly your example program. When I change from iostream to iostream.h, the compilation proceeds properly yielding a working

Re: cpp compile problems ? (Debian)

2005-08-17 Thread Peter
On Wed, 17 Aug 2005, Shachar Shemesh wrote: You are using the unsuffixed iostream. All unsuffixed standard headers reside in the std namespace. Either switch to iostream.h (not recommended), add here a line that says: using namespace std; This fixed it! int main( int argc, char *argv[] )

Re: cpp compile problems ? (Debian)

2005-08-17 Thread Peter
On Thu, 18 Aug 2005, guy keren wrote: and this is a very very very very bad habbit. never use 'using namespace' in new code. Why is it so bad ? I am giving the compiler hints as to what classes to look in when it tries to guess what I am doing, no ? Peter

Re: cpp compile problems ? (Debian)

2005-08-17 Thread guy keren
On Wed, 17 Aug 2005, Peter wrote: On Thu, 18 Aug 2005, guy keren wrote: and this is a very very very very bad habbit. never use 'using namespace' in new code. Why is it so bad ? I am giving the compiler hints as to what classes to look in when it tries to guess what I amdoing, no ?