From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Darryl Cook Newsgroups: gmane.os.tru64.managers Subject: Summary: gcc 3.2.3 problem with includes Date: Tue, 08 Jul 2003 12:40:34 -0400 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <3F0AF402.9050606@cs.cs.appstate.edu> References: <3F09C26D.5060308@cs.cs.appstate.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1057682454 16516 80.91.224.249 (8 Jul 2003 16:40:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 8 Jul 2003 16:40:54 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Tue Jul 08 18:40:50 2003 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 19ZvVt-0004Gc-00 for ; Tue, 08 Jul 2003 18:40:21 +0200 Original-Received: (qmail 393 invoked by uid 5); 8 Jul 2003 16:40:54 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 384 invoked by uid 49493); 8 Jul 2003 16:40:54 -0000 Original-Received: from dlc@cs.cs.appstate.edu by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-7.4/5.0):. Processed in 0.427745 secs); 08 Jul 2003 16:40:54 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (160.91.4.110) by 0 with SMTP; 8 Jul 2003 16:40:54 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HHP00L6JT00VT@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 08 Jul 2003 12:40:51 -0400 (EDT) Original-Received: from cs.cs.appstate.edu (cs.appstate.edu [152.10.143.13]) by emroute3.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HHP003CPSZS76@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 08 Jul 2003 12:40:45 -0400 (EDT) Original-Received: from cs.cs.appstate.edu (cookdl-0.cs.appstate.edu [152.10.134.74]) by cs.cs.appstate.edu (8.12.9/8.12.8) with ESMTP id h68GedFg259622 for ; Tue, 08 Jul 2003 12:40:39 -0400 (EDT) Original-To: Tru64 Mailing List X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 Xref: main.gmane.org gmane.os.tru64.managers:4781 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:4781 Thanks to Stan Horwitz, Steve Feehan and Pinghc for quick replies........seems to work if you put using namespace std; right below the includes or you could set it each time like std::cout. At any rate you have to tell it with 3.x versions which conforms more to standards that were adopted. Also you need to set LD_LIBRARY_PATH environment variable to /gcc_installed_directory/lib. thanks! darryl cook Darryl Cook wrote: > Im having a problem with includes and gcc 3.1 and 3.2.3. If I compile > the following: > > #include > #include > > int main(void) > { > string card; > > while (cin >> card) > { > cout << "value = " << card[0] << endl; > cout << "suit = " card[1] << endl; > } > } > > getcards.C: In function `int main()': > getcards.C:6: `string' undeclared (first use this function) > getcards.C:6: (Each undeclared identifier is reported only once for each > function it appears in.) > getcards.C:6: parse error before `;' token > getcards.C:8: `cin' undeclared (first use this function) > getcards.C:8: `card' undeclared (first use this function) > getcards.C:10: `cout' undeclared (first use this function) > getcards.C:10: `endl' undeclared (first use this function) > > cout is defined in the iostream.h file which is located at > /usr/local/gcc/gcc-3.1/include/g++-v3/backward. > > Any ideas why it dont find the declaration for cout? > > thanks > darryl >