From owner-freebsd-questions@FreeBSD.ORG Mon Apr 21 02:42:25 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EEE537B401 for ; Mon, 21 Apr 2003 02:42:25 -0700 (PDT) Received: from ms-smtp-02.southeast.rr.com (ms-smtp-02.southeast.rr.com [24.93.67.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 861A543F85 for ; Mon, 21 Apr 2003 02:42:24 -0700 (PDT) (envelope-from jgriffis@ec.rr.com) Received: from mail3.ec.rr.com (fe3 [24.93.67.50])h3L9eJgs008195 for ; Mon, 21 Apr 2003 05:40:19 -0400 (EDT) Received: from ec.rr.com ([24.25.45.250]) by mail3.ec.rr.com with Microsoft SMTPSVC(5.5.1877.757.75); Mon, 21 Apr 2003 05:39:43 -0400 Content-Type: text/plain; charset="us-ascii" From: Jason Griffis To: freebsd-questions@freebsd.org Date: Mon, 21 Apr 2003 05:39:11 -0400 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200304210539.11227.jgriffis@ec.rr.com> Subject: g++ question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2003 09:42:25 -0000 =09I'm going through a C++ tutorial trying to increase my knowledge ;) Any way.. I wrote this little code: // My first program in C++ #include int main() { =09cout << "Hello World!"; =09return 0; } =09When I compile it this way with g++ I get errors due to the compiler n= ot=20 finding the iostream file: $ g++ -o hello hello.cc hello.cc: In function `int main()': hello.cc:6: `cout' undeclared (first use this function) hello.cc:6: (Each undeclared identifier is reported only once for each=20 function it appears in.) $ =09I do have iostream in /usr/include so I don't see why it's doing this,= =20 whenever I change it to #include it compiles fine but gives = a=20 warning of using a deprecated header file: $ g++ -o hello hello.cc In file included from /usr/include/g++/backward/iostream.h:31, from hello.cc:2: /usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This= file=20 includes at least one deprecated or antiquated header. Please consider us= ing=20 one of the 32 headers found in section 17.4.1.2 of the C++ standard. Exam= ples=20 include substituting the header for the header for C++ includes= , or=20 instead of the deprecated header . To disable this= =20 warning use -Wno-deprecated. $ =09Obviously it isn't that big of a deal with such a small program but wh= en I=20 move on to bigger projects that I'll want to use on different platforms o= ther=20 than FreeBSD these errors and warnings will be a major pain. Can anyone t= ell=20 me what might be wrong with my system in order for g++ not to see the nor= mal=20 iostream header in /usr/include ?