Error linking with wxGTK 2.8 on Kubuntu

Ondra Holub ondra.holub at post.cz
Thu Sep 6 00:38:46 PDT 2007


On 6 Zá , 01:28, lancos <claudiolancone... at gmail.com> wrote:
> I'm trying to build madedit 0.2.7 (http://madedit.sourceforge.net) on
> my Kubuntu 64bit box.
> But I got this strange error at linking stage:
>
> 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_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -
> lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -
> lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -
> lwx_baseu-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
>
> Does anyone have an idea?
>
> Thanks,
> Claudio Lanconelli

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.







More information about the wx-users mailing list