Author Topic: wxwidgets and msys 1.0  (Read 5002 times)

AcmeMan

  • Guest
wxwidgets and msys 1.0
« on: September 03, 2007, 11:10:47 am »
Hi
i've builded the wxwidgets with msys and i've configured code:blocks to work with them. In particular i've changed the following project parameters from the original template:

Compiler directories:
c:\msys\1.0\local\include\wx-2.8
c:\msys\1.0\local\lib\wx\include\msw-ansi-release-static-2.8

Linker Directories:
c:\msys\1.0\local\lib\wx

Link libraries:
wx_base-2.8
wx_base_net-2.8
wx_base_odbc-2.8
wx_base_xml-2.8
wx_msw_adv-2.8
wx_msw_aui-2.8
wx_msw_core-2.8
wx_msw_dbgrid-2.8
wx_msw_richtxt-2.8
wx_msw_xrc-2.8
winspool
winmm
shell32
comctl32
ctl3d32
odbc32
advapi32
wsock32
opengl32
glu32
ole32
oleaut32
uidd

The program is well compiled by code::blocks but i got the following error message from the linker:

Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : D:\Documenti\Programmazione\GestionalStudio\
--------------------------------------------------------------------------------
Switching to target: default
Linking executable: D:\Documenti\Programmazione\GestionalStudio\Agenda.exe
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_window.o):window.cpp:(.text+0x195b): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_window.o):window.cpp:(.text+0x5795): undefined reference to `wxEVT_POWER_SUSPENDING'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_window.o):window.cpp:(.text+0x579f): undefined reference to `wxEVT_POWER_SUSPEND_CANCEL'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_window.o):window.cpp:(.text+0x57a9): undefined reference to `wxEVT_POWER_SUSPENDED'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_window.o):window.cpp:(.text+0x57b3): undefined reference to `wxEVT_POWER_RESUME'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_wincmn.o):wincmn.cpp:(.text+0x638): undefined reference to `wxSystemOptions::HasOption(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_wincmn.o):wincmn.cpp:(.text+0x69d): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_wincmn.o):wincmn.cpp:(.text+0xc18): undefined reference to `wxSystemOptions::HasOption(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_wincmn.o):wincmn.cpp:(.text+0xc7d): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_dc.o):dc.cpp:(.text+0x631a): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_dc.o):dc.cpp:(.text+0x71c3): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_tbar95.o):tbar95.cpp:(.text+0x2cd4): undefined reference to `wxSystemOptions::HasOption(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_tbar95.o):tbar95.cpp:(.text+0x2d26): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_statbox.o):statbox.cpp:(.text+0x2b7): undefined reference to `wxSystemOptions::HasOption(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_statbox.o):statbox.cpp:(.text+0x337): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_statbox.o):statbox.cpp:(.text+0x464): undefined reference to `wxSystemOptions::HasOption(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_statbox.o):statbox.cpp:(.text+0x549): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_statbox.o):statbox.cpp:(.text+0xbd0): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_colourcmn.o):colourcmn.cpp:(.text+0x209): undefined reference to `wxVariant::SetData(wxVariantData*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_colourcmn.o):colourcmn.cpp:(.text+0xa6a): undefined reference to `wxVariantData::ms_classInfo'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x14cd): undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x1570): undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x168d): undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x1730): undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x184d): undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x18f7): more undefined references to `wxClientDataContainer::~wxClientDataContainer()' follow
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x2bd9): undefined reference to `wxClientDataContainer::wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x2cde): undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x2d69): undefined reference to `wxClientDataContainer::wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x2e6e): undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x2ef9): undefined reference to `wxClientDataContainer::wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x2ff8): undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x3089): undefined reference to `wxClientDataContainer::wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x3188): undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x4d1f): undefined reference to `wxClientDataContainer::wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x4e08): undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x4e9f): undefined reference to `wxClientDataContainer::wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.text+0x4f88): undefined reference to `wxClientDataContainer::~wxClientDataContainer()'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV22wxStdDialogButtonSizer[vtable for wxStdDialogButtonSizer]+0x7c): undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV22wxStdDialogButtonSizer[vtable for wxStdDialogButtonSizer]+0x80): undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV22wxStdDialogButtonSizer[vtable for wxStdDialogButtonSizer]+0x84): undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV22wxStdDialogButtonSizer[vtable for wxStdDialogButtonSizer]+0x88): undefined reference to `wxClientDataContainer::DoGetClientData() const'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV7wxSizer[vtable for wxSizer]+0x7c): undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV7wxSizer[vtable for wxSizer]+0x80): undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV7wxSizer[vtable for wxSizer]+0x84): undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV7wxSizer[vtable for wxSizer]+0x88): undefined reference to `wxClientDataContainer::DoGetClientData() const'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV11wxGridSizer[vtable for wxGridSizer]+0x7c): undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV11wxGridSizer[vtable for wxGridSizer]+0x80): undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV11wxGridSizer[vtable for wxGridSizer]+0x84): undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV11wxGridSizer[vtable for wxGridSizer]+0x88): undefined reference to `wxClientDataContainer::DoGetClientData() const'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV15wxFlexGridSizer[vtable for wxFlexGridSizer]+0x7c): undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV15wxFlexGridSizer[vtable for wxFlexGridSizer]+0x80): undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV15wxFlexGridSizer[vtable for wxFlexGridSizer]+0x84): undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV15wxFlexGridSizer[vtable for wxFlexGridSizer]+0x88): undefined reference to `wxClientDataContainer::DoGetClientData() const'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV10wxBoxSizer[vtable for wxBoxSizer]+0x7c): undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV10wxBoxSizer[vtable for wxBoxSizer]+0x80): undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV10wxBoxSizer[vtable for wxBoxSizer]+0x84): undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV10wxBoxSizer[vtable for wxBoxSizer]+0x88): undefined reference to `wxClientDataContainer::DoGetClientData() const'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV16wxStaticBoxSizer[vtable for wxStaticBoxSizer]+0x7c): undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV16wxStaticBoxSizer[vtable for wxStaticBoxSizer]+0x80): undefined reference to `wxClientDataContainer::DoGetClientObject() const'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV16wxStaticBoxSizer[vtable for wxStaticBoxSizer]+0x84): undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_sizer.o):sizer.cpp:(.rdata$_ZTV16wxStaticBoxSizer[vtable for wxStaticBoxSizer]+0x88): undefined reference to `wxClientDataContainer::DoGetClientData() const'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_notebook.o):notebook.cpp:(.text+0x3555): undefined reference to `wxSystemOptions::HasOption(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_notebook.o):notebook.cpp:(.text+0x37df): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_image.o):image.cpp:(.text+0x287): undefined reference to `wxVariant::SetData(wxVariantData*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_image.o):image.cpp:(.text+0xb036): undefined reference to `wxVariantData::ms_classInfo'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_bmpbase.o):bmpbase.cpp:(.text+0x177): undefined reference to `wxVariant::SetData(wxVariantData*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_bmpbase.o):bmpbase.cpp:(.text+0x387): undefined reference to `wxVariant::SetData(wxVariantData*)'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_bmpbase.o):bmpbase.cpp:(.text+0xa70): undefined reference to `wxVariantData::ms_classInfo'
C:\msys\1.0\local\lib\libwx_msw_core-2.8.a(corelib_bmpbase.o):bmpbase.cpp:(.text+0xabd): undefined reference to `wxVariantData::ms_classInfo'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 3 seconds)
0 errors, 0 warnings

AcmeMan

  • Guest
Re: wxwidgets and msys 1.0
« Reply #1 on: September 03, 2007, 04:37:03 pm »
Problem solved. I've just reordered the libraries list:

wx_msw_core-2.8
wx_base-2.8
wx_base_net-2.8
wx_base_odbc-2.8
wx_base_xml-2.8
wx_msw_adv-2.8
wx_msw_aui-2.8
wx_msw_dbgrid-2.8
wx_msw_richtxt-2.8
wx_msw_xrc-2.8
winspool
winmm
shell32
comctl32
ctl3d32
odbc32
advapi32
wsock32
opengl32
glu32
ole32
oleaut32
uidd

msw-core must stay in front of the others.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxwidgets and msys 1.0
« Reply #2 on: September 03, 2007, 04:46:24 pm »
msw-core must stay in front of the others.

No, it's not True in all cases. It worked because your app needed wxbase and wxcore libraries.

For example, if you use wxXml classes, then wxXml lib should come before wxbase. You can refer the following chart to determine the library ordering.
Quote
http://www.wxwidgets.org/manuals/stable/wx_librarieslist.html
The libraries, pointing to other library, should be placed before the libraries they are pointing to.
Be a part of the solution, not a part of the problem.