LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-12-2005, 04:45 AM   #1
aes canis
Member
 
Registered: May 2005
Location: Finland
Distribution: Slackware 13.37, Ubuntu 10.10
Posts: 123

Rep: Reputation: 15
GCC-3.3.4 C++ & Depreciated libraries


I've done few web searches, but can't find anything really concrete...

When I started my adventures in C++ I used a couple of "Teach yourself... type guides. One "TYC++ in 21 days", and the other from cplusplus.com.

However, after trying to compile the initial "Hello world" code, I get and error message saying the code has refered to a depreciated library - the examples of "Hello world" I used, calls up <iostream.h>. It also goes on about the C++ standards chapter 17 something or other...

I'm OK with that, as the example I found which showed how to use gcc c++, used <iostream> in it's version of "Hello world", which works.
There were a few other distinct differences as well between gcc c++'s idea of c++ and the tutorials I have.

So, how can I get GCC-3.3.4 C++ to compile code with these depreciated libraries, such as iostream.h, or any other .h library for that matter?

Or have I missed something relly basic/stupid?
 
Old 05-12-2005, 05:03 AM   #2
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
it'll still compile it, just give you a warning about using that method ( I don't know about g++-3.4 or 4.x, they may make it illegal).

here is another reference for you if you are looking for good books on c++ ( and it's free):
http://mindview.net/Books/TICPP/ThinkingInCPP2e.html
 
Old 05-12-2005, 05:43 AM   #3
aes canis
Member
 
Registered: May 2005
Location: Finland
Distribution: Slackware 13.37, Ubuntu 10.10
Posts: 123

Original Poster
Rep: Reputation: 15
Groovey stuff, thanks - I've just now downloaded them, so watch this space for more cries of help...
 
Old 05-12-2005, 06:12 AM   #4
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
The .h extension of the standard libs is non-standard. The tutorials you used (as did I) showed the OLD way of doing it; as of the new ISO standard you drop the .h:
Code:
#include <iostream>
ta0kira

PS That is an international C++ standard; not g++.

Last edited by ta0kira; 05-12-2005 at 06:13 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc-libraries yashwantpinge Programming 3 11-22-2005 12:17 AM
downgrading gcc and other libraries on FC3 kernelnayyer Fedora 1 02-14-2005 09:49 PM
SUSE 9.1 and gcc, cc, c, c++, mpich libraries Hypermood Linux - Newbie 7 12-08-2004 10:25 AM
Problem with linking libraries using gcc shortyzms Linux - Software 1 03-29-2004 08:13 PM
C libraries with GCC compiler Ciccio Programming 2 12-02-2002 11:20 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration