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



debian-user:

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?


http://packages.debian.org/search?searchon=contents&keywords=iostream.h&mode=path&suite=stable&arch=i386


Please see console session, below.

Any suggestions?


TIA,

David



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
6.0.3

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
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


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
Archive: http://lists.debian.org/4EF289A7.4080901@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 ...
    (Debian-User)
  • 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* ...
    (SuSE)
  • 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... ...
    (Debian-User)
  • 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 ...
    (Debian-User)
  • Re: OpenToken
    ... OpenToken already has a Debian maintainer, his name is Reto Buerki, ... Ada-France for the public source code repository (possibly with ... the Debian bug tracking system as a public bug database ... because there is no Free Software driver for it. ...
    (comp.lang.ada)