LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 04-26-2007, 05:49 PM   #1
estitt
LQ Newbie
 
Registered: Apr 2007
Posts: 8

Rep: Reputation: 0
standard c++ libraries missing?


hello,

I've been using 2007.0 and am now trying out 2007.1. Actually, on both distros, I am unable to use the standard c++ libraries when coding (<iostream>, <string>, etc.) I can use the c libraries (<stdio.h>, <stdlib.h>, etc.)

I've installed the gcc-c++ package and libstdc++, both with no success. anyone know what gives?

tia.
 
Old 04-26-2007, 06:28 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 3,015

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
Are you putting in a "using namespace std" line at the beginning of your code? Eg:

Code:
#include <iostream>
using namespace std;

int main()
{
  cout << "Hello World !" << endl;
  return 0;
  
}
 
Old 04-26-2007, 06:42 PM   #3
estitt
LQ Newbie
 
Registered: Apr 2007
Posts: 8

Original Poster
Rep: Reputation: 0
wow, it HAS been a while since I wrote c++. Thanks, great catch.
 
Old 04-26-2007, 10:23 PM   #4
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 3,015

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
It's an easy mistake to make since back in the day you didn't need a namespace statement but you do now or you run into problems.
 
  


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
Missing X libraries? kf-linux Programming 1 12-14-2006 01:05 PM
Missing libraries simasimon Slackware 1 05-03-2006 06:02 PM
c++ libraries missing roxvogn Programming 1 03-07-2005 02:38 PM
C++ libraries and new standard blufire Programming 8 03-01-2005 03:47 PM
Use gcc and standard libraries with SUSE 9.1 Personal warrenpatrick Linux - Newbie 3 10-10-2004 08:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 03:51 AM.

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
Open Source Consulting | Domain Registration