学如逆水行舟,不进则退;心似平原走马,易放难收!时间就像海绵里的水,只要愿挤,总还是有的。
在用wxWidgets编写一个支持多国语言的Unicode程序时,发现一个问题:如果这么写代码:
wxTextCtrl* info = new wxTextCtrl(this, wxID_ANY,_("本软件目前支持Windows、Linux平台,"
"Windows平台主程序:pmoney.exe ,Linux平台主程序:pmoney ,请在不同不同执行不同的主程序。"...
的话,_()宏会出现编译错误:"Windows平台主程序:pmoney.exe ,Linux平台主程序:pmoney ,请在不同不同执行不同的主程序。"...
src\about.cpp|21|error C2308: concatenating mismatched wide strings|
写一个跨平台程序,简单的wxImageList代码:
难道wxMSW和wxGTK的还有些不同?错误信息如下:
wxImageList* images = new wxImageList(size, size, true);
竟然在Linux(Debian)下无法编译,而在Windows平台是没有问题的。难道wxMSW和wxGTK的还有些不同?错误信息如下:
/media/disk/project/pmoney/src/treewnd.cpp|135|error: invalid use of incomplete type ‘struct wxImageList’|
/usr/local/include/wx-2.8/wx/generic/listctrl.h|16|error: forward declaration of ‘struct wxImageList’|
/usr/local/include/wx-2.8/wx/generic/listctrl.h|16|error: forward declaration of ‘struct wxImageList’|



2008/08/02


