Hi,
I am trying to port a windows application based on WxWidgets 2.8.9 to MacOS X. I've gotten to the point where everything compiles successfully, except from a few missing symbols related to WxWidgets. I've tried compiling WxWidgets with the command line and with XCode and I've tried several different configuration options, but none of this has worked properly. The WxWidgets Wiki has a few articles about this here, but most of the information is outdated and none of it solved my problem.
The closest I got was by compiling WxWidgets at the command line with
./configure --enable-monolithic
make
Then I linked the library by adding "wxMac-2.8.9/lib/libwx_mac-2.8.a" to the "Other Linker Flags" in my XCode project settings.
But this gives me the following linking errors:
"wxOnAssert(char const*, int, char const*, char const*, char const*)", referenced from: wxStringBase::wxStringBase(wxStringBase const&)in MyFrame.o wxCloseEvent::Veto(bool) in MyFrame.o wxStringBase::wxStringBase(wxStringBase const&)in TGameSettingsForm.o wxCheckBoxBase::DoSet3StateValue(wxCheckBoxState) in TGameSettingsForm.o wxCheckBoxBase::DoGet3StateValue() const in TGameSettingsForm.o wxStringBase::wxStringBase(wxStringBase const&)in NonoGameStates.o wxStringBase::wxStringBase(wxStringBase const&)in TWxInvalidRegCodeForm.o
"_iconv_close", referenced from: wxMBConv_iconv::~wxMBConv_iconv()in libwx_mac-2.8.a(monolib_strconv.o) wxMBConv_iconv::~wxMBConv_iconv()in libwx_mac-2.8.a(monolib_strconv.o) wxMBConv_iconv::~wxMBConv_iconv()in libwx_mac-2.8.a(monolib_strconv.o) wxMBConv_iconv::~wxMBConv_iconv()in libwx_mac-2.8.a(monolib_strconv.o)
"wxAppConsole::OnAssert(char const*, int, char const*, char const*)", referenced from: vtable for CMyWxApp3_wxstaticAppin MyWxApp3-wxstaticApp.o
"_iconv", referenced from: wxMBConv_iconv::GetMBNulLen() const in libwx_mac-2.8.a(monolib_strconv.o) wxMBConv_iconv::WC2MB(char*, wchar_t const*, unsigned long) constin libwx_mac-2.8.a(monolib_strconv.o) wxMBConv_iconv::WC2MB(char*, wchar_t const*, unsigned long) constin libwx_mac-2.8.a(monolib_strconv.o) wxMBConv_iconv::MB2WC(wchar_t*, char const*, unsigned long) constin libwx_mac-2.8.a(monolib_strconv.o) wxMBConv_iconv::MB2WC(wchar_t*, char const*, unsigned long) constin libwx_mac-2.8.a(monolib_strconv.o) wxMBConv_iconv::wxMBConv_iconv(char const*)in libwx_mac-2.8.a(monolib_strconv.o)
"wxAppConsole::OnAssertFailure(char const*, int, char const*, char const*, char const*)", referenced from: vtable for CMyWxApp3_wxstaticAppin MyWxApp3-wxstaticApp.o "_iconv_open", referenced from: wxMBConv_iconv::wxMBConv_iconv(char const*)in libwx_mac-2.8.a(monolib_strconv.o) wxMBConv_iconv::wxMBConv_iconv(char const*)in libwx_mac-2.8.a(monolib_strconv.o) wxMBConv_iconv::wxMBConv_iconv(char const*)in libwx_mac-2.8.a(monolib_strconv.o) wxMBConv_iconv::wxMBConv_iconv(char const*)in libwx_mac-2.8.a(monolib_strconv.o) ld: symbol(s) not found collect2: ld returned 1 exit status
If possible, I would prefer dynamic linking, not static linking as used above. However, for the moment I would be happy to get it running at all. If anyone could give me (or point me to) a working step-by-step description on how to compile and link the WxWidgets library, I would be very thankful.
Thanks,
Adrian