7.x Compatibility

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

 



Hi All,

//Application Source
[root@xxxxxxxx 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@xxxxxxxx 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@xxxxxxxx root]#


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

Any idea?

Thanks.

T. Muthu Mohan.


-- 
Psyche-list mailing list
Psyche-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux