brant_chen 0 Newbie Poster

Why I can't compile a helloworld with Unicode supported by wxDevC++?

I made a test programm.
But I can only compile it by GCC compiler (library type is static lib) without wxwidgets Unicode support.

If I checked the Unicode support at compiling setttings,
it said ld error, can't find -lwxmsw28u and -lwxmsw28u_gl.
My wxDev-C++ version is 7.0RC6, build 7.0.0.85.

I searched the C:\Program Files\Dev-Cpp\lib, no libwxmws28u.a existed.(Why? Does wxDevCpp not contain the unicode libraries?)

Then I have to download wxPack_v2.8.9.02, install it.
Then I copied libwxmws28u.a and libwxmws28u_gl.a from C:\wxWidgets2.8\lib\gcc_lib to C:\Program Files\Dev-Cpp\lib, then compiled it again.
Then it reported :

Default GCC compiler
Building Makefile: "C:\temp\Makefile.win"
执行 make...
mingw32-make.exe -f "C:\temp\Makefile.win" all
g++.exe Objects/MingW/test1App.o Objects/MingW/test1Frm.o Objects/MingW/test1_private.res -o "Output\MingW\test1.exe" -L"C:/Program Files/Dev-Cpp/Lib" -mwindows -lwxmsw28u -lwxmsw28u_gl -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32

Objects/MingW/test1App.o:test1App.cpp:(.text+0x19): undefined reference to `_imp___ZN12wxAppConsole17CheckBuildOptionsEPKcS1_'
Objects/MingW/test1App.o:test1App.cpp:(.text+0x30): undefined reference to `_imp___ZN5wxAppC2Ev'
Objects/MingW/test1App.o:test1App.cpp:(.text+0x52): undefined reference to `_imp___ZN12wxAppConsole14ms_appInstanceE'
Objects/MingW/test1App.o:test1App.cpp:(.text+0x83): undefined reference to `_imp___Z7wxEntryP11HINSTANCE__S0_Pci'
Objects/MingW/test1App.o:test1App.cpp:(.text+0xa8): undefined reference to `_imp___ZN12wxStringBase4nposE'
Objects/MingW/test1App.o:test1App.cpp:(.text+0xbb): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKcjj'
Objects/MingW/test1App.o:test1App.cpp:(.text+0xd1): undefined reference to `_imp__wxDefaultSize'
Objects/MingW/test1App.o:test1App.cpp:(.text+0xdb): undefined reference to `_imp__wxDefaultPosition'
Objects/MingW/test1App.o:test1App.cpp:(.text+0x182): undefined reference to `_imp___ZN12wxAppConsole12ms_appInitFnE'
Objects/MingW/test1App.o:test1App.cpp:(.rdata$_ZTV11test1FrmApp[vtable for test1FrmApp]+0x44): undefined reference to `wxApp::Initialize(int&, char**)'
Objects/MingW/test1App.o:test1App.cpp:(.text$_ZN11test1FrmAppD1Ev[test1FrmApp::~test1FrmApp()]+0x14): undefined reference to `_imp___ZN5wxAppD2Ev'
Objects/MingW/test1App.o:test1App.cpp:(.text$_ZN11test1FrmAppD0Ev[test1FrmApp::~test1FrmApp()]+0x15): undefined reference to `_imp___ZN5wxAppD2Ev'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x33): undefined reference to `_imp___ZN12wxStringBase4nposE'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x4e): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKcjj'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x78): undefined reference to `_imp__wxNullIcon'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0xfd): undefined reference to `_imp__wxFrameNameStr'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x111): undefined reference to `_imp___ZN12wxStringBase4nposE'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x126): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKcjj'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x12f): undefined reference to `_imp___ZN11wxFrameBaseC2Ev'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x135): undefined reference to `_imp___ZTV7wxFrame'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x143): undefined reference to `_imp___ZN7wxFrame4InitEv'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x17a): undefined reference to `_imp___ZN7wxFrame6CreateEP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x1ed): undefined reference to `_imp__wxFrameNameStr'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x201): undefined reference to `_imp___ZN12wxStringBase4nposE'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x216): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKcjj'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x21f): undefined reference to `_imp___ZN11wxFrameBaseC2Ev'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x225): undefined reference to `_imp___ZTV7wxFrame'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x233): undefined reference to `_imp___ZN7wxFrame4InitEv'

Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x26a): undefined reference to `_imp___ZN7wxFrame6CreateEP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x2e4): undefined reference to `_imp___ZN7wxFrameD2Ev'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x304): undefined reference to `_imp___ZN7wxFrameD2Ev'

Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x325): undefined reference to `_imp___ZN7wxFrameD2Ev'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x376): undefined reference to `_imp___ZN7wxFrame13sm_eventTableE'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x398): undefined reference to `_imp___ZN16wxEventHashTableC1ERK12wxEventTable'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x3b4): undefined reference to `_imp__wxEVT_CLOSE_WINDOW'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x3d8): undefined reference to `_imp__wxEVT_NULL'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text+0x429): undefined reference to `_imp___ZN16wxEventHashTableD1Ev'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text$_ZN12wxWindowBase7SetNameERK8wxString[wxWindowBase::SetName(wxString const&)]+0x1b): undefined reference to `_imp___ZN12wxStringBaseaSERKS_'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text$_ZNK12wxWindowBase7GetNameEv[wxWindowBase::GetName() const]+0x17): undefined reference to `_imp__wxEmptyString'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text$_ZN12wxWindowBase19SetAcceleratorTableERK18wxAcceleratorTable[wxWindowBase::SetAcceleratorTable(wxAcceleratorTable const&)]+0x1f): undefined reference to `_imp___ZN8wxObject3RefERKS_'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text$_ZNK12wxWindowBase10HasCaptureEv[wxWindowBase::HasCapture() const]+0x8): undefined reference to `_imp___ZN12wxWindowBase10GetCaptureEv'

Objects/MingW/test1Frm.o:test1Frm.cpp:(.text$_ZNK12wxWindowBase20GetDefaultAttributesEv[wxWindowBase::GetDefaultAttributes() const]+0x1c): undefined reference to `_imp___ZN12wxWindowBase25GetClassDefaultAttributesE15wxWindowVariant'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text$_ZN12wxWindowBase18SetInitialBestSizeERK6wxSize[wxWindowBase::SetInitialBestSize(wxSize const&)]+0x3): undefined reference to `_imp___ZN12wxWindowBase14SetInitialSizeERK6wxSize'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text$_ZN20wxTopLevelWindowBase8IsActiveEv[wxTopLevelWindowBase::IsActive()]+0x8): undefined reference to `_imp___ZN12wxWindowBase9FindFocusEv'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text$_ZN20wxTopLevelWindowBase8IsActiveEv[wxTopLevelWindowBase::IsActive()]+0x11): undefined reference to `_imp___Z19wxGetTopLevelParentP8wxWindow'
Objects/MingW/test1Frm.o:test1Frm.cpp:(.text$_ZN7wxFrame19MSWTranslateMessageEP6tagMSG[wxFrame::MSWTranslateMessage(tagMSG*)]+0x19): undefined reference to `_imp___ZN7wxFrame21MSWDoTranslateMessageEPS_P6tagMSG'
collect2: ld returned 1 exit status
mingw32-make.exe: *** [Output/MingW/test1.exe] Error 1

Compilation Failed. Make ret 2

If I changed the library type to dynamic dll without Unicode support, it seems reported same error.


Please help me.
Thank you very much.