Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, December 2007
wchar_t under VS2005 and up


Message 1 in thread

I'm working on some code which interoperates with some other C++
libraries, one of which I did not have source code for until recently,
and I thus ran into an interesting quandary.

Is there a good reason (i.e., it doesn't currently build) that the build
settings for Qt in Visual Studio 2005 have /Zc:wchar_t- set?  I could,
of course, try rebuilding it without that set by modifying the
qmake.conf, but before I try that I'm curious why that is, and if
there's any plan to change that.

Fortunately I have the source code for the other library now, so I can
rebuild it with /Zc:wchar_t- for the time being.

--
 [ signature omitted ] 

Message 2 in thread

Gordon Schumacher wrote:
> [...]

Maybe because of "breaking changes in VS2k5" against older versions: 
http://msdn2.microsoft.com/en-us/library/ms177253.aspx



--
 [ signature omitted ] 

Message 3 in thread

Gordon Schumacher schrieb:
> I'm working on some code which interoperates with some other C++
> libraries, one of which I did not have source code for until recently,
> and I thus ran into an interesting quandary.
> 
> Is there a good reason (i.e., it doesn't currently build) that the build
> settings for Qt in Visual Studio 2005 have /Zc:wchar_t- set?  I could,
> of course, try rebuilding it without that set by modifying the
> qmake.conf, but before I try that I'm curious why that is, and if
> there's any plan to change that.
> 
> Fortunately I have the source code for the other library now, so I can
> rebuild it with /Zc:wchar_t- for the time being.
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

Hello Gordon,
you can mix QStrings and wchar_t with <reinterpret_cast...

example // this is a win32 API example, OutputString is a QString...

MessageBox(0, reinterpret_cast<const wchar_t *>(OutputString.data()), 
(LPCWSTR)"SQL-ERROR !", MB_OK | MB_ICONEXCLAMATION);

Regards,
Peter

--
 [ signature omitted ]