Error linking with wxGTK 2.8 on Kubuntu
Evan Charlton
usenet at evancharlton.com
Mon Sep 10 09:06:10 PDT 2007
lancos wrote:
> On 6 Set, 09:38, Ondra Holub <ondra.ho... at post.cz> wrote:
>> Hi. I think you are mixing debug and release versions. Compare command
>> line parameters for compiler and linker with output of wx-config --
>> cxxflags and wx-config --libs. I think there will be some
>> inconsistency in WX_DEBUG or NDEBUG preprocessor symbols.
>
> Thank you for the suggestion.
> Unfortunately I don't have found any consistency.
> I enable debug mode too, but the problem is the same.
> The problem seems related to a C std function call, the free() call in
> wxstring.h
> Here a more complete output
>
> g++ -DHAVE_CONFIG_H -I. -I./wxFlatNotebook/include -I./wxAUI/include -
> I./charset-detector/include -I./charset-detector/src -I./charset-
> detector/src/tables -I/usr/lib/wx/include/gtk2-unicode-debug-2.8 -I/
> usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__
> -D__WXGTK__ -DwxUSE_AUI=1 -DWXDLLIMPEXP_AUI= -DDATA_DIR=\"/usr/local/
> share\" -g -O2 -DPNG_NO_MMX_CODE -I/usr/include/glib-2.0 -I/usr/lib/
> glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/
> usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/
> usr/include/freetype2 -I/usr/include/libpng12 -I./xpressive -MT
> madedit-MadAboutDialog.o -MD -MP -MF .deps/madedit-MadAboutDialog.Tpo -
> c -o madedit-MadAboutDialog.o `test -f 'src/MadAboutDialog.cpp' ||
> echo './'`src/MadAboutDialog.cpp
> mv -f .deps/madedit-MadAboutDialog.Tpo .deps/madedit-MadAboutDialog.Po
> g++ -DwxUSE_AUI=1 -DWXDLLIMPEXP_AUI= -DDATA_DIR=\"/usr/local/share\" -
> g -O2 -DPNG_NO_MMX_CODE -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/
> include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/
> include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/
> include/freetype2 -I/usr/include/libpng12 -I./xpressive -o
> madedit madedit-MadAboutDialog.o madedit-MadConvEncDialog.o madedit-
> MadEditApp.o madedit-MadEditFrame.o madedit-MadFindInFilesDialog.o
> madedit-MadHighlightingDialog.o madedit-MadOptionsDialog.o madedit-
> MadPlugin.o madedit-MadPrintout.o madedit-MadReplaceDialog.o madedit-
> MadSearchDialog.o madedit-MadSortDialog.o madedit-MadUtils.o madedit-
> MadWordCountDialog.o madedit-caret_new.o madedit-clipbrd_gtk.o madedit-
> MadEdit.o madedit-MadEditAdvanced.o madedit-MadEditCommand.o madedit-
> MadEditSearch.o madedit-MadEdit_gtk.o madedit-MadEncoding.o madedit-
> MadLines.o madedit-MadSyntax.o madedit-MadUndo.o madedit-TradSimp.o
> madedit-fnb_resources.o madedit-popup_dlg.o madedit-renderer.o madedit-
> wxFlatNotebook.o madedit-xh_fnb.o madedit-auibook.o madedit-dockart.o
> madedit-floatpane.o madedit-framemanager.o madedit-tabmdi.o madedit-
> CharDistribution.o madedit-JpCntx.o madedit-LangBulgarianModel.o
> madedit-LangCyrillicModel.o madedit-LangGreekModel.o madedit-
> LangHebrewModel.o madedit-LangHungarianModel.o madedit-LangThaiModel.o
> madedit-nsBig5Prober.o madedit-nsCharSetProber.o madedit-
> nsEscCharsetProber.o madedit-nsEscSM.o madedit-nsEUCJPProber.o madedit-
> nsEUCKRProber.o madedit-nsEUCTWProber.o madedit-nsGB2312Prober.o
> madedit-nsHebrewProber.o madedit-nsLatin1Prober.o madedit-
> nsMBCSGroupProber.o madedit-nsMBCSSM.o madedit-nsSBCharSetProber.o
> madedit-nsSBCSGroupProber.o madedit-nsSJISProber.o madedit-
> nsUniversalDetector.o madedit-nsUTF8Prober.o madedit-impl.o -lgtk-
> x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -
> lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -
> lXfixes -lpango-1.0 -lcairo -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -
> lglib-2.0 -pthread -lwx_gtk2ud_aui-2.8 -lwx_gtk2ud_xrc-2.8 -
> lwx_gtk2ud_qa-2.8 -lwx_gtk2ud_html-2.8 -lwx_gtk2ud_adv-2.8 -
> lwx_gtk2ud_core-2.8 -lwx_baseud_xml-2.8 -lwx_baseud_net-2.8 -
> lwx_baseud-2.8
> madedit-MadAboutDialog.o: In function `~wxString':
> /usr/include/wx-2.8/wx/string.h:243: undefined reference to `free'
> madedit-MadAboutDialog.o: In function `~wxStringBase':
> /usr/include/wx-2.8/wx/string.h:243: undefined reference to `free'
> /usr/include/wx-2.8/wx/string.h:243: undefined reference to `free'
> madedit-MadAboutDialog.o: In function `~wxString':
> /usr/include/wx-2.8/wx/string.h:243: undefined reference to `free'
> madedit-MadAboutDialog.o: In function `~wxStringBase':
> /usr/include/wx-2.8/wx/string.h:243: undefined reference to `free'
> madedit-MadAboutDialog.o:/usr/include/wx-2.8/wx/string.h:243: more
> undefined references to `free' follow
> /usr/bin/ld: madedit: hidden symbol `free' isn't defined
> /usr/bin/ld: final link failed: Nonrepresentable section on output
> collect2: ld returned 1 exit status
> make[2]: *** [madedit] Error 1
> make[2]: Leaving directory `/home/lancos/buildpkg/madedit-0.2.7'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/lancos/buildpkg/madedit-0.2.7'
> make: *** [all] Error 2
>
When I have run into errors like this before, it was because I was, like
Ondra Holub said, mixing build configurations. Sorry to repeat, but
you're sure you've built Unicode Debug? (--enable-unicode and
--enable-debug)
More information about the wx-users
mailing list