help-gplusplus
[Top][All Lists]
Advanced

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

Re: Using std::wstring


From: Guy Harrison
Subject: Re: Using std::wstring
Date: Fri, 29 Oct 2004 15:59:49 GMT
User-agent: KNode/0.7.7

Jamiil wrote:

> Thanks for the help Guy!
> A long time ago I wrote a class wrapper for what I found to be some of
> the most common methods in std::string. In the past few days I have
> seen the word "UNICODE" and/or "Internationalization" popping up on my
> desk, so I have decided to make my programs multicultural ready. C++
> has this "std::wstring" that might be the bridge to achieve my goal.
> However, using cygwin as my Win development platform I have not even
> been able to compile the simplest of programs.
> If you know what to do to compile this program using GCC, I would be
> most grateful.
> 
> Thanks in advance
> 
> Guy Harrison <swamp-DEL-dog@ntlworld.com> wrote in message
> news:<g14alc.gq82.ln@sd-if.swampdog>...
>> Jamiil wrote:
>> 
>> > This my class
>> > #include <string>
>> > 001 class TTest{
>> > 002   private:
>> > 003       std::string str;
>> > 004       std::wstring wstr;
>> > 005 };
>> > 
>> > I am using Cygwin-GCC 3.3.3 under MSW.
>> > Make reports an error syntax error before ; token at line 004.
>> > 
>> > Does anyone know what I am doing wrong?

You're not. My bad memory! You need to use STLPort and as I cocked up I
tried it under cygwin: STLport-4.6.2.tar.gz will build(*)...

$ tar xvzf STLport-4.6.2.tar.gz && cd STLport-4.6.2/src
$ make -f gcc-cygwin.mak install

...will install into /usr/local. You need to ensure the stlport headers
preceed the system ones...

g++ -I/usr/local/include/stlport foo.cpp -L/usr/local/lib -lstlport_cygwin

...for a static non-debug link for instance.

(*)
I'll go try most recent snapshot later. If there's supposed to be DLL's
generated it didn't happen (but the static versions will allow you to get
on with your work).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]