This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
linking error when using gcc 3.0 snapshot
- To: <gcc-help at gcc dot gnu dot org>
- Subject: linking error when using gcc 3.0 snapshot
- From: "Vickle Chan" <vicklec at 21cn dot com>
- Date: Fri, 15 Jun 2001 09:38:39 +0800
I installed the gcc 3.0 daily snapshot rpm 20010531 from
www.codesourcery.com on my Redhat 7.0
and I wrote a test program as simple as:
// test3.cpp
#include <iostream>
#include <fstream>
using namespace std;
int main ()
{
ofstream outfile ("test.txt");
outfile << "hello" << endl;
outfile.close();
return 0;
}
then I ran g++ to compile it:
g++ -o test3 test3.cpp
but got this result:
/tmp/ccOGTANJ.o: In function `std::codecvt<char, char, __mbstate_t> const&
std::
use_facet<std::codecvt<char, char, __mbstate_t> >(std::locale const&)':
/tmp/ccOGTANJ.o(.gnu.linkonce.t._ZSt9use_facetISt7codecvtIcc11__mbstate_tEER
KT_R
KSt6locale+0x7): undefined reference to `std::codecvt<char, char,
__mbstate_t>::
id'
collect2: ld returned 1 exit status
I have no idea about that, does the gcc3.0 installaition need extra
configuring ? Would anybody be so kind to help me? Thanks in advance. :-)