http://stackoverflow.com/questions/18805155/tdm-gcc-w64-script-to-change-windres-for-32bit
I am a simple hobbyist programmer, but when I tried to use TDM-GCC-64 4.8.1 on Code::Blocks 13.12 on Windows 7 to compile the default wxWidgets template on Code::Blocks, it did not work.
It took me weeks until I found the error line in the title. I have been getting this as well:
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x4c): undefined reference to wxAppConsoleBase::CheckBuildOptions(char const*, char const*)'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x6b): undefined reference to
wxApp::wxApp()'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0xf3): undefined reference to wxEntry(HINSTANCE__*, HINSTANCE__*, char*, int)'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x101): undefined reference to
wxAppConsoleBase::ms_appInstance'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x16f): undefined reference to wxConvLibcPtr'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x180): undefined reference to
wxString::npos'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x19e): undefined reference to wxString::ConvertStr(char const*, unsigned int, wxMBConv const&)'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x1b3): undefined reference to
wxPrivate::GetUntypedNullData()'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x1d2): undefined reference to wxPrivate::GetUntypedNullData()'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x203): undefined reference to
wxPrivate::GetUntypedNullData()'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x236): undefined reference to wxPrivate::GetUntypedNullData()'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x267): undefined reference to
wxPrivate::GetUntypedNullData()'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x27a): undefined reference to wxTranslations::Get()'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x29d): undefined reference to
wxTranslations::GetTranslatedString(wxString const&, wxString const&) const'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x374): undefined reference to wxIcon::wxIcon(wxString const&, wxBitmapType, int, int)'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x38c): undefined reference to
wxTopLevelWindowBase::SetIcon(wxIcon const&)'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x397): undefined reference to wxIcon::~wxIcon()'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x436): undefined reference to
wxTranslations::GetUntranslatedString(wxString const&)'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x4a8): undefined reference to wxGet_wxConvLibcPtr()'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x4ad): undefined reference to
wxConvLibcPtr'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text+0x502): undefined reference to wxIcon::~wxIcon()'
obj\Release\wxtestApp.o:wxtestApp.cpp:(.text$_ZNK12wxWindowBase19DoGetBestClientSizeEv[__ZNK12wxWindowBase19DoGetBestClientSizeEv]+0xabfd3fece0000011): undefined reference to
wxDefaultSize'
g:/progr/tdm-gcc/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: obj\Release\wxtestApp.o: bad reloc address 0x1 in section `.text$_ZNK12wxWindowBase19DoGetBestClientSizeEv[__ZNK12wxWindowBase19DoGetBestClientSizeEv]'
collect2.exe: error: ld returned 1 exit status
These errors are just undefined references, yes? But I have successfully linked with the libraries, included the correct headers, and made sure that my "gcc_dll" folder was the one I was trying to use. I am using the SHARED=1, UNICODE=1, BUILD=release build of wxWidgets 3.0.0, but it appears that the problems stems from that .res incompatability. There is a fix, but I've decided to switch over to TDM-GCC-32 instead.
Anonymous
my bad...
On 32 bit compile of wxWidgets the genrcdefs.h creates the rcdefs.h with TARGET_CPU_AMD64 the correct line should read TARGET_CPU_X86
Can't find the question or problem report in this submission. Please see the guidelines at http://tdm-gcc.tdragon.net/bugs.