Debian 6.0.3 i386 - g++ hello.cpp - error: iostream.h: No such file or directory


I'm attempting to compile C++ "hello, world!" on Debian 6.0.3 i386 and seem to be missing iostream.h (?). libstdc++6 seems to be installed (?). Do I need one of these packages?

Please see console session, below.

Any suggestions?



2011-12-21 17:30:10 dpchrist@p43400e ~/sandbox/cpp
$ g++ hello.cpp
hello.cpp:1:22: error: iostream.h: No such file or directory
hello.cpp:3: error: '::main' must return 'int'
hello.cpp: In function 'int main()':
hello.cpp:5: error: 'cout' is not a member of 'std'

2011-12-21 17:30:11 dpchrist@p43400e ~/sandbox/cpp
$ cat hello.cpp
#include <iostream.h>
using namespace std;
void main ()
std::cout << "hello, world!";

2011-12-21 17:30:18 dpchrist@p43400e ~/sandbox/cpp
$ cat /etc/debian_version

2011-12-21 17:30:26 dpchrist@p43400e ~/sandbox/cpp
$ g++ --version
g++ (Debian 4.4.5-8) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

2011-12-21 17:30:30 dpchrist@p43400e ~/sandbox/cpp
$ sudo apt-get install libstdc++6-4.4-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libstdc++6-4.4-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.

To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx

Relevant Pages

  • Re: compiling a Debian package
    ... for Debian to freely distribute such a package. ... The obsession with free software unfortunately leads to dead ends. ... so they have regressed to deprecate everything ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
  • Re: Irony
    ... > Some of the reasons I switched my desktop from Ubuntu to Debian ... We will be guided by the needs of our users and the free software ... There's the users who are not developers. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
  • Re: [opensuse] Word for all of us... [OT]
    ... What are the objectives for Open Suse? ... Make openSUSE the easiest Linux distribution for anyone to obtain ... ISTM that Open Suse values ease of use for newbies more than, say, Debian, Gentoo or Slackware. ... *We will give back to the free software community* ...
  • Re: Cant smoothly type in gnome-terminal
    ... Very annoying (there are a lot of decent terminal programs in Debian, ... but gnome-terminal is still the nicest I've found). ... Distribute Free Software -- ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
  • Re: debian vs ubuntu and knoppix
    ... >| "Ubuntu is Free Software, and available to you free of charge. ... Debian was created to create a 100% DSFG Free Software distro. ... Debian has struggled with non-Free drivers and such over the years... ...