linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil C <hpypenguin@yahoo.com>
To: Steve Graegert <graegerts@gmail.com>
Cc: C Programming Mailing List <linux-c-programming@vger.kernel.org>
Subject: Re: gcc/g++ fails to compile
Date: Sat, 2 Aug 2008 17:36:07 -0700 (PDT)	[thread overview]
Message-ID: <327486.3175.qm@web59705.mail.ac4.yahoo.com> (raw)

>It is hard to tell what the problem is without sample code and the exact error message along with some details >about your system configuration.


>Regards

 >       \Steve

Sorry for the lack of information I hope this makes the situation more clear. I'm using Ubuntu Linux 8.04 and every current stable patch kernel wise. GCC is version 4.3 Remaining info is as follows.

//Sample Code

#include<iostream>
using namespace std;

int main() {
    cout <<"Hello World";
    return 0;
}

//Error message copied from terminal

/tmp/ccERz0tv.o:
In function `std::__verify_grouping(char const*, unsigned int,
std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)':
test.cpp:(.text+0xe):
undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::size()
const'
test.cpp:(.text+0x59): undefined reference to
`std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::operator[](unsigned int) const'
test.cpp:(.text+0x97):
undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::operator[](unsigned int) const'
test.cpp:(.text+0xdf):
undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::operator[](unsigned int) const'
/tmp/ccERz0tv.o: In function `main':
test.cpp:(.text+0x128): undefined reference to `std::cout'
test.cpp:(.text+0x12d):
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/ccERz0tv.o: In function `__static_initialization_and_destruction_0(int, int)':
test.cpp:(.text+0x15d): undefined reference to `std::ios_base::Init::Init()'
/tmp/ccERz0tv.o: In function `__tcf_0':
test.cpp:(.text+0x1aa): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccERz0tv.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

 - Phil C


      


             reply	other threads:[~2008-08-03  0:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-03  0:36 Phil C [this message]
2008-08-03  3:31 ` gcc/g++ fails to compile Glynn Clements
2008-08-03  9:52 ` Kristof Provost
  -- strict thread matches above, loose matches on Subject: below --
2008-08-02 10:09 Phil C

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=327486.3175.qm@web59705.mail.ac4.yahoo.com \
    --to=hpypenguin@yahoo.com \
    --cc=graegerts@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).