[CMake] cmake and wxwidgets on windows

Werner Smekal smekal at iap.tuwien.ac.at
Tue Nov 4 11:32:57 EST 2008

Hi Miguel,

> Thanks Werner. However, I'm not sure what the correct solution is... I
> googled a bit and can't find any documentation indicating that
> _UNICODE needs to be defined.
> From the following link:
> http://docs.wxwidgets.org/stable/wx_unicode.html
> it seems that using the correct macros (i.e., wxT(), etc.) should
> suffice. There is some information below that suggests that maybe
> wxUSE_UNICODE is the macro to define, but even there it is not clear
> if this should be done in user code or build configuration.
> If somebody can point me to the appropriate documentation or samples
> in the wiki, I'll appreciate it.

It's actually defined in wx/platform.h


if _UNICODE is set, wxUSE_UNICODE will be set. Problem here is and  
although I use wxWidgets now for 8 years, I still don't know how this  
setup.h procedure should work correctly. Actually the "mistake" of  
John was, that he compiled wxWidgets with UNICODE=1 setting on the  
mingw32-make command line. But then after that you are supposed to  
make the settings in setup.h on your own (change wxUSE_UNICODE to 1).  
This is because there is no configure which does that for you.  
Obviously this _UNICODE workaround is also used, look e.g. here


So it's either that we believe the user should handle that on him/her  
own, or the wxWidgets module just defines the _UNICODE macro which  
shouldn't do any harm. Maybe we should ask the wxWidgets list.


> --Miguel

Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien

email: smekal at iap.tuwien.ac.at
web: http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office), +43-(0)1-58801-13469 (laboratory)
fax: +43-(0)1-58801-13499

More information about the CMake mailing list