Author Topic: C:B & wxWidgets  (Read 6051 times)

Offline creatxr

  • Multiple posting newcomer
  • *
  • Posts: 28
C:B & wxWidgets
« on: April 17, 2007, 07:19:59 am »
problem 1:
when I use wizard to create a new wxWidgets 's project, the error message is:
Quote
A matching Debug configuration cannot be found in the wxWidgets-Directory you specified.
I've built wxWidgets 2.8.0 to $wx/build-debug
I've set the global variable "wx" -------please see the picture below.

problem 2:
after wizard, I added all wx libs to link libraries of the project and compile.
it 's error on linking.....
the error message:
Quote
:D:\DOWNLOADS\New Folder\wx123\wx123Main.cpp:55: undefined reference to `wxWindow::RegisterHotKey(int, int, int)'
:D:\DOWNLOADS\New Folder\wx123\wx123Main.cpp:55: undefined reference to `wxWindow::UnregisterHotKey(int)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_window.o):..\src\msw\window.cpp:1317: undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_window.o):..\src\msw\window.cpp:3921: undefined reference to `wxEVT_POWER_SUSPENDING'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_window.o):..\src\msw\window.cpp:3925: undefined reference to `wxEVT_POWER_SUSPEND_CANCEL'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_window.o):..\src\msw\window.cpp:3929: undefined reference to `wxEVT_POWER_SUSPENDED'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_window.o):..\src\msw\window.cpp:3936: undefined reference to `wxEVT_POWER_RESUME'
:..\src\common\wincmn.cpp:212: undefined reference to `wxSystemOptions::HasOption(wxString const&)'
:..\src\common\wincmn.cpp:214: undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
:..\src\common\wincmn.cpp:212: undefined reference to `wxSystemOptions::HasOption(wxString const&)'
:..\src\common\wincmn.cpp:214: undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
:..\src\common\bmpbase.cpp:141: undefined reference to `wxVariant::SetData(wxVariantData*)'
:..\src\common\bmpbase.cpp:32: undefined reference to `wxVariant::SetData(wxVariantData*)'
:..\src\common\bmpbase.cpp:31: undefined reference to `wxVariantData::ms_classInfo'
:..\src\common\bmpbase.cpp:32: undefined reference to `wxVariantData::ms_classInfo'
:..\include\wx\variant.h:99: undefined reference to `vtable for wxVariantData'
:..\include\wx\variant.h:68: undefined reference to `vtable for wxVariantData'
:..\src\common\colourcmn.cpp:141: undefined reference to `wxVariant::SetData(wxVariantData*)'
:..\src\common\colourcmn.cpp:29: undefined reference to `wxVariantData::ms_classInfo'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_dc.o):..\src\msw\dc.cpp:1213: undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_dc.o):..\src\msw\dc.cpp:2138: undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_tbar95.o):..\src\msw\tbar95.cpp:567: undefined reference to `wxSystemOptions::HasOption(wxString const&)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_tbar95.o):..\src\msw\tbar95.cpp:567: undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_statbox.o):..\src\msw\statbox.cpp:204: undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_statbox.o):..\include\wx\sysopt.h:40: undefined reference to `wxSystemOptions::HasOption(wxString const&)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_statbox.o):..\include\wx\sysopt.h:40: undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
:..\src\common\sizer.cpp:504: undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
:..\src\common\sizer.cpp:504: undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
:..\src\common\sizer.cpp:504: undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
:..\src\common\sizer.cpp:504: undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
:..\src\common\sizer.cpp:504: undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):..\src\common\sizer.cpp:504: more undefined references to `wxClientDataContainer::~wxClientDataContainer()' follow
:..\include\wx\sizer.h:388: undefined reference to `wxClientDataContainer::wxClientDataContainer()'
:..\include\wx\sizer.h:388: undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV16wxStaticBoxSizer[vtable for wxStaticBoxSizer]+0x7c):: undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV16wxStaticBoxSizer[vtable for wxStaticBoxSizer]+0x80):: undefined reference to `wxClientDataContainer::DoGetClientObject() const'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV16wxStaticBoxSizer[vtable for wxStaticBoxSizer]+0x84):: undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV16wxStaticBoxSizer[vtable for wxStaticBoxSizer]+0x88):: undefined reference to `wxClientDataContainer::DoGetClientData() const'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV10wxBoxSizer[vtable for wxBoxSizer]+0x7c):: undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV10wxBoxSizer[vtable for wxBoxSizer]+0x80):: undefined reference to `wxClientDataContainer::DoGetClientObject() const'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV10wxBoxSizer[vtable for wxBoxSizer]+0x84):: undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV10wxBoxSizer[vtable for wxBoxSizer]+0x88):: undefined reference to `wxClientDataContainer::DoGetClientData() const'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV15wxFlexGridSizer[vtable for wxFlexGridSizer]+0x7c):: undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV15wxFlexGridSizer[vtable for wxFlexGridSizer]+0x80):: undefined reference to `wxClientDataContainer::DoGetClientObject() const'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV15wxFlexGridSizer[vtable for wxFlexGridSizer]+0x84):: undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV15wxFlexGridSizer[vtable for wxFlexGridSizer]+0x88):: undefined reference to `wxClientDataContainer::DoGetClientData() const'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV11wxGridSizer[vtable for wxGridSizer]+0x7c):: undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV11wxGridSizer[vtable for wxGridSizer]+0x80):: undefined reference to `wxClientDataContainer::DoGetClientObject() const'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV11wxGridSizer[vtable for wxGridSizer]+0x84):: undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
E:\MinGW\wxWidgets-2.8.0\build-debug\lib\libwx_mswud_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV11wxGridSizer[vtable for wxGridSizer]+0x88):: undefined reference to `wxClientDataContainer::DoGetClientData() const'
:: More errors follow but not being shown.
:: Edit the max errors limit in compiler options...
:: === Build finished: 50 errors, 0 warnings ===

[attachment deleted by admin]

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: C:B & wxWidgets
« Reply #1 on: April 17, 2007, 08:07:14 am »
Solution 1:

Wizard searches standard directory as recommended by wx. So if you give wx path as C:\wxdir, wizard will expect the debug lib for GCC to be at C:\wxdir\lib\gcc_lib directory or so depending upon your wx configuration. If you are using non-standard directory, then ignore the error, create the project and change the directories manually.

Solution 2:

It's a lib-ordering problem. Core lib is dependent upon base and thus core lib should come before base. The case is similar for others, too.

Read the following page for more details.
Quote
http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
Be a part of the solution, not a part of the problem.

Offline creatxr

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: C:B & wxWidgets
« Reply #2 on: April 17, 2007, 10:22:11 am »
well. you are right.thanks.
on the pass, I use MSYS to compile wx.
now I use cmd (mingw32-make.exe) to compile wx.

problem 1 seems already be soluved. (because I only compile debug files, now it doesn't prompt message "A matching Debug configuration cannot be ......")


I think problem 2 has already been soluved. after I rebuild wx with mingw32-make.exe and create a new wx program with wizard. the program run .

thanks

but when I checked prefrerred GUI build to wxSmith, it's error.....
« Last Edit: April 17, 2007, 10:30:02 am by creatxr »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: C:B & wxWidgets
« Reply #3 on: April 17, 2007, 02:12:26 pm »
but when I checked prefrerred GUI build to wxSmith, it's error.....

What is the exact error? :)
Be a part of the solution, not a part of the problem.

Offline creatxr

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: C:B & wxWidgets
« Reply #4 on: April 17, 2007, 03:21:14 pm »
I added switch USE_SMITH=1 to command and recompile wx..
It seems no problem now.
perhaps it need switch "USE_SMITH=1", doesn't it?

My compile command:

mingw32-make.exe -f makefile.gcc UNICODE=1 SHARED=1 MONOLITHIC=1 USE_XRC=1 USE_SMITH=1 BUILD=debug DEBUG_GDB=1

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: C:B & wxWidgets
« Reply #5 on: April 17, 2007, 03:28:45 pm »
USE_SMITH=1 is not defined anywhere in the wxWidgets makefile and the compilation will surely fail.

Following command should be sufficient to create wxSmith based projects.
Code
mingw32-make.exe -f makefile.gcc UNICODE=1 SHARED=1 MONOLITHIC=1 USE_XRC=1 BUILD=debug

Regards,

Biplab
Be a part of the solution, not a part of the problem.

Offline creatxr

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: C:B & wxWidgets
« Reply #6 on: April 17, 2007, 04:13:30 pm »
thanks.
now I've success compile the app which from the wizard.

I wantn't copy DLLs to system's dir or project's output dir.

can I set in C::B for let app can see the DLLs?
 

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: C:B & wxWidgets
« Reply #7 on: April 17, 2007, 06:24:08 pm »
You can compile wxWidgets with
Code
SHARED=0
So you don't have to mess around with dlls.
Just have a look at wxWidgets compile/install instructions.