LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-28-2013, 02:26 AM   #1
anbarasi
LQ Newbie
 
Registered: Mar 2013
Location: bangalore
Posts: 13

Rep: Reputation: Disabled
help!!


i am using fedora...i hv installed gcc!
wen i compile i get error std::cin and cout not found!
this command i hv used !yum install gcc-c++

is there any other thing i need to install??
 
Old 07-28-2013, 02:39 AM   #2
moo-cow
Member
 
Registered: Mar 2006
Distribution: Debian
Posts: 105

Rep: Reputation: 26
Please post your source code and the command that you're using to compile it!
 
Old 07-28-2013, 03:19 AM   #3
anbarasi
LQ Newbie
 
Registered: Mar 2013
Location: bangalore
Posts: 13

Original Poster
Rep: Reputation: Disabled
#include<iostream>
using namespace std;
int main()
{
cout<<"hello\n";
return 0;
}
after compling i get error
in fn maiin: undefined reference to 'std::cout'
undefined reference to 'std::basic ostream
 
Old 07-28-2013, 03:35 AM   #4
cristi92b
Member
 
Registered: May 2011
Posts: 89

Rep: Reputation: Disabled
Did you compiled it with a command like:
Code:
g++ main.cpp -o main.exe
?

Last edited by cristi92b; 07-28-2013 at 03:42 AM.
 
1 members found this post helpful.
  


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




All times are GMT -5. The time now is 11:59 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