News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Cannot build wxWidgets 2.8.0 project using wxRichText

Started by three_minute_hero, January 09, 2007, 07:26:38 PM

Previous topic - Next topic

three_minute_hero

Hi everyone,

I'm experiencing some problems with C::B and wxWidgets library.
Everything is in the title: I cannot build wxWidgets projects using richtext and/or xml library. I'm sure the problem comes from my C::B's configuration, cause I even can't build wx's richtext sample, which can be build by a MingW make command.
When I try to build the richtext sample with C::B (using the unofficial modified wxWidgets wizard and including every libraries), I got the following error messages:


C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextbuffer.o)(.text+0x164df): In function `ZN16wxRichTextBuffer4InitEv':
C:/wx280/build/msw/../../src/richtext/richtextbuffer.cpp:4616: undefined reference to `wxCommandProcessor::wxCommandProcessor(int)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextbuffer.o)(.text+0x1ee64): In function `ZN17wxRichTextCommandC2ERK8wxString19wxRichTextCommandIdP16wxRichTextBufferP14wxRichTextCtrlb':
C:/wx280/build/msw/../../src/richtext/richtextbuffer.cpp:5903: undefined reference to `wxCommand::wxCommand(bool, wxString const&)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextbuffer.o)(.text+0x1efd4): In function `ZN17wxRichTextCommandC1ERK8wxString19wxRichTextCommandIdP16wxRichTextBufferP14wxRichTextCtrlb':
C:/wx280/build/msw/../../src/richtext/richtextbuffer.cpp:5903: undefined reference to `wxCommand::wxCommand(bool, wxString const&)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextbuffer.o)(.text+0x1f13e): In function `ZN17wxRichTextCommandC2ERK8wxString':
C:/wx280/build/msw/../../src/richtext/richtextbuffer.cpp:5908: undefined reference to `wxCommand::wxCommand(bool, wxString const&)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextbuffer.o)(.text+0x1f208): In function `ZN17wxRichTextCommandC1ERK8wxString':
C:/wx280/build/msw/../../src/richtext/richtextbuffer.cpp:5908: undefined reference to `wxCommand::wxCommand(bool, wxString const&)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextbuffer.o)(.text$_ZN9wxCommandD2Ev[wxCommand::~wxCommand()]+0xb): In function `ZNK9wxCommand7CanUndoEv':
C:/wx280/build/msw/../../include/wx/cmdproc.h: undefined reference to `vtable for wxCommand'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextbuffer.o)(.rdata$_ZTV17wxRichTextCommand[vtable for wxRichTextCommand]+0x8):C:/wx280/build/msw/../../include/wx/cmdproc.h: undefined reference to `wxCommand::GetClassInfo() const'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextstyles.o)(.text+0x2702): In function `ZN22wxRichTextStyleListBox12UpdateStylesEv':
C:/wx280/build/msw/../../src/richtext/richtextstyles.cpp:523: undefined reference to `wxVListBox::SetSelection(int)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextstyles.o)(.text+0x2931):C:/wx280/build/msw/../../src/richtext/richtextstyles.cpp:551: undefined reference to `wxVListBox::SetSelection(int)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextstyles.o)(.text+0x293c):C:/wx280/build/msw/../../src/richtext/richtextstyles.cpp:552: undefined reference to `wxVListBox::SendSelectedEvent()'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextstyles.o)(.text+0x29a9): In function `ZN22wxRichTextStyleListBox17SetStyleSelectionERK8wxString':
C:/wx280/build/msw/../../src/richtext/richtextstyles.cpp:568: undefined reference to `wxVListBox::SetSelection(int)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextstyles.o)(.text+0x3392): In function `ZN22wxRichTextStyleListBox10OnLeftDownER12wxMouseEvent':
C:/wx280/build/msw/../../src/richtext/richtextstyles.cpp:696: undefined reference to `wxVListBox::OnLeftDown(wxMouseEvent&)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextstyles.o)(.text+0x33fa): In function `ZN22wxRichTextStyleListBox17OnLeftDoubleClickER12wxMouseEvent':
C:/wx280/build/msw/../../src/richtext/richtextstyles.cpp:705: undefined reference to `wxVListBox::OnLeftDown(wxMouseEvent&)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextstyles.o)(.text+0x39c4): In function `ZN22wxRichTextStyleListBox6OnIdleER11wxIdleEvent':
C:/wx280/build/msw/../../src/richtext/richtextstyles.cpp:776: undefined reference to `wxVListBox::SetSelection(int)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextstyles.o)(.text+0x49ca): In function `ZN25wxRichTextStyleComboPopup11OnMouseMoveER12wxMouseEvent':
C:/wx280/build/msw/../../src/richtext/richtextstyles.cpp:1028: undefined reference to `wxVListBox::SetSelection(int)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextstyles.o)(.text$_ZNK17wxVScrolledWindow7HitTestERK7wxPoint[wxVScrolledWindow::HitTest(wxPoint const&) const]+0x20): In function `ZNK29wxRichTextListStyleDefinition12GetClassInfoEv':
C:/wx280/build/msw/../../src/richtext/richtextstyles.cpp:37: undefined reference to `wxVScrolledWindow::HitTest(int, int) const'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextstyles.o)(.rdata$_ZTV25wxRichTextStyleComboPopup[vtable for wxRichTextStyleComboPopup]+0x19c): In function `ZNK25wxRichTextStyleDefinition22GetStyleMergedWithBaseEPK20wxRichTextStyleSheet':
C:/wx280/build/msw/../../src/richtext/richtextstyles.cpp:64: undefined reference to `wxVScrolledWindow::ScrollLines(int)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextstyles.o)(.rdata$_ZTV25wxRichTextStyleComboPopup[vtable for wxRichTextStyleComboPopup]+0x1a0):C:/wx280/build/msw/../../src/richtext/richtextstyles.cpp:64: undefined reference to `wxVScrolledWindow::ScrollPages(int)'
C:\wx280\lib\gcc_lib/libwxmsw28ud_richtext.a(richtextlib_richtextstyles.o)(.rdata$_ZTV25wxRichTextStyleComboPopup[vtable for wxRichTextStyleComboPopup]+0x1d4):C:/wx280/build/msw/../../src/richtext/richtextstyles.cpp:65: undefined reference to `wxVScrolledWindow::Layout()'

.......................................... and a lot of others !!



Could anyone please help me ?

Ceniza

Libraries order?

Try moving libwxmsw28ud_richtext.a before libwxmsw28ud.a (or whatever it be called in your system).

three_minute_hero

Wonderful, It works like a charm!

How can you explain the importance of librairies order? Besides, I find quite unintuitive to put base librairies after high-level ones... don't you ?

Anyway, should I consider this like a bug and inform the unofficial wizard's development team ?

Thanks a lot !

Ceniza

Let's say it this way: if library A needs something from library B, that something will be "searched" in the following libraries, not the previous ones, so you need to put A first, then B. While this may not be an accurate definition, the basic idea is there.

In your case, wxmsw_richtext needs something from wxmsw, that's why wxmsw must go after wxmsw_richtext.

If that's a wizard's fault, inform it.

three_minute_hero

Understood! :)

The library inclusion was generated by the wizard, so I'll inform the team about it.

Thank you very much!

mandrav

The fact that linking order matters is nobody's fault. It's just how ld (gcc's linker) works. But if the project was generated by a wizard then that wizard could be updated to use the correct linking order ;).
Be patient!
This bug will be fixed soon...

Biplab

Quote from: mandrav on January 10, 2007, 09:23:31 AM
The fact that linking order matters is nobody's fault. It's just how ld (gcc's linker) works. But if the project was generated by a wizard then that wizard could be updated to use the correct linking order ;).

I've updated the build order. I'll post it after some more tests.
Be a part of the solution, not a part of the problem.