[MinGW] Undefined references to assert handlers

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
ComFreek
Knows some wx things
Knows some wx things
Posts: 30
Joined: Wed Jun 09, 2010 1:13 pm

[MinGW] Undefined references to assert handlers

Post by ComFreek » Sun Sep 16, 2012 11:20 am

Hello,

I've just compiled wxWidgets 2.94 under Windows 8 RTM 64-bit in all possible combinations with SHARED, MONOLITHIC and BUILD.
All were successful except the monolithic builds:

Code: Select all

wxWidgets-2.9.4\build\msw>mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=debug

wxWidgets-2.9.4\build\msw>mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release
I got these errors from the first command:

Code: Select all

..\..\lib\gcc_dll\libwxscintillad.a(wxscintilla_Editor.o):Editor.cxx:(.text$_Z12
wxVectorSortI14SelectionRangeEvR8wxVectorIT_E[void wxVectorSort<SelectionRange>(
wxVector<SelectionRange>&)]+0x3f): undefined reference to `_imp___Z7wxQsortPvjjP
FiPKvS1_S1_ES1_'
..\..\lib\gcc_dll\libwxscintillad.a(wxscintilla_Editor.o):Editor.cxx:(.text$_ZN8
wxVectorI14SelectionRangeE2atEj[wxVector<SelectionRange>::at(unsigned int)]+0x7)
: undefined reference to `_imp__wxTheAssertHandler'
..\..\lib\gcc_dll\libwxscintillad.a(wxscintilla_Editor.o):Editor.cxx:(.text$_ZN8
wxVectorI14SelectionRangeE2atEj[wxVector<SelectionRange>::at(unsigned int)]+0x43
): undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_S0_'
..\..\lib\gcc_dll\libwxscintillad.a(wxscintilla_Selection.o):Selection.cxx:(.tex
t$_ZNK8wxVectorI14SelectionRangeE2atEj[wxVector<SelectionRange>::at(unsigned int
) const]+0x7): undefined reference to `_imp__wxTheAssertHandler'
..\..\lib\gcc_dll\libwxscintillad.a(wxscintilla_Selection.o):Selection.cxx:(.tex
t$_ZNK8wxVectorI14SelectionRangeE2atEj[wxVector<SelectionRange>::at(unsigned int
) const]+0x43): undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_S0_'
..\..\lib\gcc_dll\libwxscintillad.a(wxscintilla_Selection.o):Selection.cxx:(.tex
t$_ZN8wxVectorI14SelectionRangeE5eraseEPS0_S2_[wxVector<SelectionRange>::erase(S
electionRange*, SelectionRange*)]+0x18): undefined reference to `_imp__wxTheAsse
rtHandler'
..\..\lib\gcc_dll\libwxscintillad.a(wxscintilla_Selection.o):Selection.cxx:(.tex
t$_ZN8wxVectorI14SelectionRangeE5eraseEPS0_S2_[wxVector<SelectionRange>::erase(S
electionRange*, SelectionRange*)]+0x74): undefined reference to `_imp___Z10wxOnA
ssertPKciS0_S0_S0_'
..\..\lib\gcc_dll\libwxscintillad.a(wxscintilla_Selection.o):Selection.cxx:(.tex
t$_ZN9wxPrivate21wxVectorMemOpsGenericI14SelectionRangeE15MemmoveBackwardEPS1_S3
_j[wxPrivate::wxVectorMemOpsGeneric<SelectionRange>::MemmoveBackward(SelectionRa
nge*, SelectionRange*, unsigned int)]+0xa): undefined reference to `_imp__wxTheA
ssertHandler'
..\..\lib\gcc_dll\libwxscintillad.a(wxscintilla_Selection.o):Selection.cxx:(.tex
t$_ZN9wxPrivate21wxVectorMemOpsGenericI14SelectionRangeE15MemmoveBackwardEPS1_S3
_j[wxPrivate::wxVectorMemOpsGeneric<SelectionRange>::MemmoveBackward(SelectionRa
nge*, SelectionRange*, unsigned int)]+0x44): undefined reference to `_imp___Z10w
xOnAssertPKciS0_S0_S0_'
collect2: ld returned 1 exit status
mingw32-make: *** [..\..\lib\gcc_dll\wxmsw294ud_gcc_custom.dll] Error 1
From the second command:

Code: Select all

Creating library file: ..\..\lib\gcc_dll\libwxmsw29u.a
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../..
/mingw32/bin/ld.exe: <unknown-file>:0: syntax error
Warning: .drectve `-export:T.1010 ' unrecognized
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../..
/mingw32/bin/ld.exe: <unknown-file>:0: syntax error
Warning: .drectve `-export:T.1243 ' unrecognized

// cut because the same errors occurs just with different numbers (T.xxxx)

..\..\lib\gcc_dll\libwxscintilla.a(wxscintilla_Editor.o):Editor.cxx:(.text+0x721
e): undefined reference to `_imp__wxTheAssertHandler'
..\..\lib\gcc_dll\libwxscintilla.a(wxscintilla_Editor.o):Editor.cxx:(.text+0x750
0): undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_S0_'
..\..\lib\gcc_dll\libwxscintilla.a(wxscintilla_Editor.o):Editor.cxx:(.text+0x767
d): undefined reference to `_imp___Z7wxQsortPvjjPFiPKvS1_S1_ES1_'
..\..\lib\gcc_dll\libwxscintilla.a(wxscintilla_Editor.o):Editor.cxx:(.text$_ZN8w
xVectorI14SelectionRangeE2atEj[wxVector<SelectionRange>::at(unsigned int)]+0xf):
 undefined reference to `_imp__wxTheAssertHandler'
..\..\lib\gcc_dll\libwxscintilla.a(wxscintilla_Editor.o):Editor.cxx:(.text$_ZN8w
xVectorI14SelectionRangeE2atEj[wxVector<SelectionRange>::at(unsigned int)]+0x46)
: undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_S0_'
collect2: ld returned 1 exit status
mingw32-make: *** [..\..\lib\gcc_dll\wxmsw294u_gcc_custom.dll] Error 1
The other builds worked just fine!

Many thanks in advance for your help!
ComFreek

Post Reply