UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
December
Su M Tu W Th F Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Our Sponsors


Latest Postings
My friend NEEDS your HELP!
by Gizmo
11/26/08 12:21 AM
Useful PHP Functions & Code
by Gizmo
11/13/08 09:25 PM
UBBCode Tags
by Gizmo
11/13/08 09:25 PM
Topic Options
Rate This Topic
#17140 - 06/15/06 04:42 AM a problem in c++ on red hat linux 9.0
Linus Shen Offline
Junior Member

Registered: 06/15/06
Posts: 7
Loc: China
here's the programme,1.cpp:

Code:
 
#include<iostream> 
#include<string> 

int main() 
{ 
std::cout << "hello world" << std::endl; 
return(0);
} 
 
under the shell
$ gcc 1.cpp
and then appear too much unknown things~~

Code:
 
/tmp/ccL80Lex.o(.text+0x14): In function `main': 
: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)' 
/tmp/ccL80Lex.o(.text+0x21): In function `main': 
: undefined reference to `std::cout' 
/tmp/ccL80Lex.o(.text+0x26): In function `main': 
: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' 
/tmp/ccL80Lex.o(.text+0x2f): In function `main': 
: undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))' 
/tmp/ccL80Lex.o(.text+0x5c): In function `__static_initialization_and_destruction_0(int, int)': 
: undefined reference to `std::ios_base::Init::Init[in-charge]()' 
/tmp/ccL80Lex.o(.text+0x8b): In function `__tcf_0': 
: undefined reference to `std::ios_base::Init::~Init [in-charge]()' 
/tmp/ccL80Lex.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' 
collect2: ld returned 1 exit status 
HELP ME! THANKS!
_________________________
I just love it! KKK...

Top
Our Sponsors
Sponsor Our Sponsors

Sponsor Advertisements help keep UGN Security Online.



Support UGN Security by Purchasing our Sponsors Products.
Top  
#17141 - 06/15/06 06:14 AM Re: a problem in c++ on red hat linux 9.0
Linus Shen Offline
Junior Member

Registered: 06/15/06
Posts: 7
Loc: China
o...somebody help me?...help~~~
_________________________
I just love it! KKK...

Top
#17142 - 06/15/06 05:49 PM Re: a problem in c++ on red hat linux 9.0
Gizmo Administrator Online   shocked
Community Owner
*****

Registered: 02/28/02
Posts: 6958
Loc: Portland, OR; USA
Try:
g++ 1.cpp -o 1
_________________________
Donate to UGN Security here.
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#17143 - 06/16/06 05:51 AM Re: a problem in c++ on red hat linux 9.0
Linus Shen Offline
Junior Member

Registered: 06/15/06
Posts: 7
Loc: China
OH YEAH!! I GOT IT!!
I have loved you....
THANKS!
_________________________
I just love it! KKK...

Top
#17144 - 06/17/06 02:09 AM Re: a problem in c++ on red hat linux 9.0
Gizmo Administrator Online   shocked
Community Owner
*****

Registered: 02/28/02
Posts: 6958
Loc: Portland, OR; USA
No problems at all
_________________________
Donate to UGN Security here.
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#17145 - 08/11/06 07:18 PM Re: a problem in c++ on red hat linux 9.0
Scallion Offline
Junior Member

Registered: 03/04/02
Posts: 48
Loc: iraq
instead of typing std:: everything, try a "using namespace std" after your # include's

Top



Featured Member
Registered: 02/24/08
Posts: 12
Forum Stats
6889 Members
44 Forums
11026 Topics
45805 Posts

Max Online: 677 @ 06/30/07 10:06 PM
Top Posters
Gizmo 6958
UGN Security 4076
§intå× 3252
IceMyst 1449
SilentRage 1273
Ice 1146
pergesu 1134
Infinite 1039
jonconley 954
Girlie 903
Newest Members
lucky vin, prEttyNDistress, AndrewKlilly, border, f4k3m3
6889 Registered Users
Who's Online
0 registered (), 15 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Latest News
Update Humpday - Sept 26, 2008
by Gizmo
11/28/08 03:39 AM
Happy Holidays!
by Gizmo
11/27/08 09:09 AM
New Mailing
by Gizmo
11/24/08 01:30 PM
A special update...
by Gizmo
11/24/08 01:10 PM
Required Reading Update...
by Gizmo
11/07/08 11:36 AM


Donate
  Get Firefox!
Get FireFox!