[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

7.x Compatibility



Hi All,

//Application Source
[root infinity root]# more hello.cpp
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main(int argc, char *argv[])
{
        wstring x(L"Hello World!");
        //cout << "Hello World!" << endl;
        //cout << x << endl;
        return 0;
}


//Compiling with wstring support
[root infinity root]# g++296 -D__GLIBCPP_WCHAR_SUPPORT__ hello.cpp
/tmp/ccZP7RkM.o(.basic_string<wchar_t, string_char_traits<wchar_t>,
__default_alloc_template<true, 0> >::gnu.linkonce.t.assign(wchar_t const
*)+0x13): In function `basic_string<wchar_t,
string_char_traits<wchar_t>, __default_alloc_template<true, 0>
>::assign(wchar_t const *)':
: undefined reference to `string_char_traits<wchar_t>::length(wchar_t
const *)'
/tmp/ccZP7RkM.o(.basic_string<wchar_t, string_char_traits<wchar_t>,
__default_alloc_template<true, 0> >::Rep::gnu.linkonce.t.copy(unsigned
int, wchar_t const *, unsigned int)+0x2a): In function
`basic_string<wchar_t, string_char_traits<wchar_t>,
__default_alloc_template<true, 0> >::Rep::copy(unsigned int, wchar_t
const *, unsigned int)':
: undefined reference to `string_char_traits<wchar_t>::copy(wchar_t *,
wchar_t const *, unsigned int)'
/tmp/ccZP7RkM.o(.basic_string<wchar_t, string_char_traits<wchar_t>,
__default_alloc_template<true, 0> >::Rep::gnu.linkonce.t.move(unsigned
int, wchar_t const *, unsigned int)+0x2a): In function
`basic_string<wchar_t, string_char_traits<wchar_t>,
__default_alloc_template<true, 0> >::Rep::move(unsigned int, wchar_t
const *, unsigned int)':
: undefined reference to `string_char_traits<wchar_t>::move(wchar_t *,
wchar_t const *, unsigned int)'
collect2: ld returned 1 exit status
[root infinity root]#


Why the g++296 compiler throws these type of errors?

Any idea?

Thanks.

T. Muthu Mohan.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]