I am having troubles compiling my application that makes use of wxCustomButton
in wxThings. A build log is included.
I had this error once before and it was due to some interesting compiler
directives. I found that those are included in wxCustomButton:
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "toggle.h"
#endif
What do those lines do? Would they be causing this undefined reference to
vtable for wxCustomButton? If not, what would and how can I resolve it?
Note that I did try commenting out those lines in the code and recompiling.
That did not help.
I appreciate the help!
NOTES ON THE BUILD LOG:
The library Sdbase contains the Msglog class. It is prebuilt. I do have
access to the source, but I would like to not change that if possible.
The library wx_gtk2_wxthings-2.8 contains all the wxThings. wxCustomButton is
included here. I believe this is where the problem lies, but I may be wrong.
Thanks!
**** Build of configuration Linux GCC for project GSE ****
make all
g++ -o build/arssgse build/arssgseapp.o build/arssgse.o build/ballistics.o
build/confirm.o build/ipselect.o build/locked.o build/pwpmodes.o
build/telemetry.o build/viginfo.o build/vigsim.o build/weaponics.o
build/blocks/wxarssgse.o build/blocks/wxballistics.o build/blocks/wxverify.o
build/blocks/wxipselect.o build/blocks/wxlocked.o build/blocks/wxpwpmodes.o
build/blocks/wxtelemetry.o build/blocks/wxviginfo.o build/blocks/wxvigsim.o
build/blocks/wxweaponics.o -L. `wx-config --libs` `wx-config --gl-libs` -lGLU
-lGL -lwx_gtk2_wxthings-2.8 -lSdbase
./libSdbase.a(Msglog.o): In function `Msglog::onListMsgSelected(wxListEvent&)':
Msglog.cpp:(.text+0x268): undefined reference to
`wxCustomButton::SetValue(bool)'
./libSdbase.a(Msglog.o): In function `Msglog::create(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> >&)':
Msglog.cpp:(.text+0xba87): undefined reference to `vtable for wxCustomButton'
Msglog.cpp:(.text+0xbb4d): undefined reference to `wxCustomButton::Init()'
Msglog.cpp:(.text+0xbbd0): undefined reference to
`wxCustomButton::Create(wxWindow*, int, wxString const&, wxBitmap const&,
wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&)'
Msglog.cpp:(.text+0xbdef): undefined reference to
`wxCustomButton::SetMargins(wxSize const&, bool)'
Msglog.cpp:(.text+0xbed8): undefined reference to `vtable for wxCustomButton'
Msglog.cpp:(.text+0xbf9e): undefined reference to `wxCustomButton::Init()'
Msglog.cpp:(.text+0xc021): undefined reference to
`wxCustomButton::Create(wxWindow*, int, wxString const&, wxBitmap const&,
wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&)'
Msglog.cpp:(.text+0xc240): undefined reference to
`wxCustomButton::SetMargins(wxSize const&, bool)'
Msglog.cpp:(.text+0xc329): undefined reference to `vtable for wxCustomButton'
Msglog.cpp:(.text+0xc3ef): undefined reference to `wxCustomButton::Init()'
Msglog.cpp:(.text+0xc472): undefined reference to
`wxCustomButton::Create(wxWindow*, int, wxString const&, wxBitmap const&,
wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&)'
Msglog.cpp:(.text+0xc691): undefined reference to
`wxCustomButton::SetMargins(wxSize const&, bool)'
Msglog.cpp:(.text+0xc77a): undefined reference to `vtable for wxCustomButton'
Msglog.cpp:(.text+0xc840): undefined reference to `wxCustomButton::Init()'
Msglog.cpp:(.text+0xc8c3): undefined reference to
`wxCustomButton::Create(wxWindow*, int, wxString const&, wxBitmap const&,
wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&)'
Msglog.cpp:(.text+0xcae2): undefined reference to
`wxCustomButton::SetMargins(wxSize const&, bool)'
Msglog.cpp:(.text+0xcdc1): undefined reference to
`wxCustomButton::wxCustomButton(wxWindow*, int, wxString const&, wxBitmap
const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString
const&)'
Msglog.cpp:(.text+0xcf5f): undefined reference to
`wxCustomButton::SetMargins(wxSize const&, bool)'
Msglog.cpp:(.text+0xd0dd): undefined reference to
`wxCustomButton::wxCustomButton(wxWindow*, int, wxString const&, wxBitmap
const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString
const&)'
Msglog.cpp:(.text+0xd27b): undefined reference to
`wxCustomButton::SetMargins(wxSize const&, bool)'
Msglog.cpp:(.text+0xd3f9): undefined reference to
`wxCustomButton::wxCustomButton(wxWindow*, int, wxString const&, wxBitmap
const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString
const&)'
Msglog.cpp:(.text+0xd597): undefined reference to
`wxCustomButton::SetMargins(wxSize const&, bool)'
Msglog.cpp:(.text+0xd715): undefined reference to
`wxCustomButton::wxCustomButton(wxWindow*, int, wxString const&, wxBitmap
const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString
const&)'
Msglog.cpp:(.text+0xd8b3): undefined reference to
`wxCustomButton::SetMargins(wxSize const&, bool)'
Msglog.cpp:(.text+0xda31): undefined reference to
`wxCustomButton::wxCustomButton(wxWindow*, int, wxString const&, wxBitmap
const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString
const&)'
Msglog.cpp:(.text+0xdbcf): undefined reference to
`wxCustomButton::SetMargins(wxSize const&, bool)'
Msglog.cpp:(.text+0xde73): undefined reference to
`wxCustomButton::SetValue(bool)'
Msglog.cpp:(.text+0xde93): undefined reference to
`wxCustomButton::SetValue(bool)'
Msglog.cpp:(.text+0xdeb4): undefined reference to
`wxCustomButton::SetValue(bool)'
Msglog.cpp:(.text+0xded5): undefined reference to
`wxCustomButton::SetValue(bool)'
Msglog.cpp:(.text+0xdef6): undefined reference to
`wxCustomButton::SetValue(bool)'
./libSdbase.a(Msglog.o):Msglog.cpp:(.text+0xdf1b): more undefined references to
`wxCustomButton::SetValue(bool)' follow
collect2: ld returned 1 exit status
make: *** [build/arssgse] Error 1
--
Jonathan R. Haws
Electrical Engineering
Space Dynamics Laboratory
[EMAIL PROTECTED]
(435)797-4629
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
wxCode-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxcode-users