LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 02-13-2005, 08:04 PM   #1
bluknight43
LQ Newbie
 
Registered: Feb 2005
Posts: 29

Rep: Reputation: 15
gcc not working


help i tried to do a simple hello world program compile and gcc gave me more than a pages worth of undefined this and invalid reference to this here check this out...llocator<char> >::size() const'
/tmp/ccVzbOHD.o(.text+0x60): In function `std::__verify_grouping(char const*, un signed int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
: undefined reference to `std::basic_string<char, std::char_traits<char>, std::a llocator<char> >:perator[](unsigned int) const'
/tmp/ccVzbOHD.o(.text+0x9d): In function `std::__verify_grouping(char const*, un signed int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
: undefined reference to `std::basic_string<char, std::char_traits<char>, std::a llocator<char> >:perator[](unsigned int) const'
/tmp/ccVzbOHD.o(.text+0xc8): In function `std::__verify_grouping(char const*, un signed int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
: undefined reference to `std::basic_string<char, std::char_traits<char>, std::a llocator<char> >:perator[](unsigned int) const'
/tmp/ccVzbOHD.o(.text+0x11c): In function `main':

what's going on !!!?? could somebody please help
 
Old 02-13-2005, 08:08 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Try g++ instead of gcc ... you're compiling a C++ program,
and it's trying to link against C libraries (different mangling).


Cheers,
Tink
 
Old 02-13-2005, 08:08 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 02-14-2005, 05:27 AM   #4
bluknight43
LQ Newbie
 
Registered: Feb 2005
Posts: 29

Original Poster
Rep: Reputation: 15
hey thanks that helped out a lot for a minute there i though i had a bad install or something
 
Old 02-14-2005, 01:15 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by bluknight43
hey thanks that helped out a lot for a minute there i though i had a bad install or something
Pleasure mate :)


Cheers,
Tink
 
  


Reply



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
Installed GCC, but not working rangalo Linux - Software 2 02-02-2005 01:21 PM
gcc not working after LFS 6.0 ch 6.61 Barnette Linux From Scratch 1 01-11-2005 09:19 PM
gcc compile not working Norman Oklahoma Linux - Software 1 03-22-2004 10:20 AM
Slackware gcc not working? bulzbb Slackware 3 03-20-2004 12:09 AM
SCHED_FIFO not working with g++ but gcc ?! DocBexter Programming 0 09-09-2003 12:57 PM

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

All times are GMT -5. The time now is 12:21 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
Open Source Consulting | Domain Registration