Solaris and std::wstring - Help!

Kyrre Kristiansen
Wed Dec 3 12:51:00 GMT 2003


I've been trying to compile some C++ code for Solaris
for a while now, and are having quite a lot of
problems with code that uses wstring.

1. Firstly, I've tried to just compile it, and I get
Source/WStringAttributeType.h:50: error: no type
`wstring' in `std' from the compiler.
2. I tried to create my own .h- file, that contained
the following:

#include <string>

namespace std
    typedef std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >

This compiled fine, also with my code. But, upon
linking, it comes up with unresolved symbols: =>     /usr/lib/ =>       
/usr/local/lib/ =>        
/usr/local/lib/ =>    /usr/lib/ =>     /usr/lib/
        symbol not found:
        symbol not found:
        symbol not found:
        symbol not found:

Anyone konw how I can get my code successfully
compiled and linked with gcc?
from gcc -v:
Reading specs from
Configured with: ../configure
--with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld
Thread model: posix
gcc version 3.3.2

It is very important that I can compile with wstring,
as a lot of important code is using it! 

With regards,

Kyrre Kristiansen

Download Yahoo! Messenger now for a chance to win Live At Knebworth DVDs

More information about the Gcc-help mailing list