This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem compiling C++ code with gcc-3.1


   Hi,

I have recently upgraded to gcc-3.1 (installing
gcc, g++, ada, java objectivC and Fortran).  While
I
can compile c and ada programs, I am having
trouble compiling c++ programs.

My system is a Mandrake Linux 8.2 with the
necessary upgrades to run gcc-3.1.

As a test, I am trying to get the following to
compile:

#include <iostream>

using namespace std;

int main(int argc, char** argv)
{
    cout << "Hello World" << endl;

    return 0;
}

The error message that I am getting is:

g++ -o CppHello hello.cpp
/tmp/ccMhADNf.o: In function
`std::_Format_cache<char>::_S_get(std::ios_base&)'
:
/tmp/ccMhADNf.o(.gnu.linkonce.t._ZNSt13_Format_cac
heIcE6_S_getERSt8ios_base+0x5b): undefined
reference to
`std::_Format_cache<char>::_Format_cache[in-charge
]()'
/tamp/ccMhADNf.o: In function
`std::_Format_cache<char>::_S_callback(std::ios_ba
se::event, std::ios_base&, int)':
/tmp/ccMhADNf.o(.gnu.linkonce.t._ZNSt13_Format_cac
heIcE11_S_callbackENSt8ios_base5eventERS1_i+0x9f):
undefined reference to
`std::_Format_cache<char>::_Format_cache[in-charge
]()'
collect2: ld returned 1 exit status
make: *** [CppHello] Error 1

anyone have any idea of what is causing this (and
more importantly) how to fix this?

Thanks,
George



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]