Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Build error cannot find -lwx_gtk-2.4 (hackish workaround found)

(1/2) > >>

ideasman42:
Just built wxGTK-2.8.9, was able to build CodeLite, but having this odd problem linking CodeBlocks from svn rev 5322

Heres the error,
/bin/sh ../../libtool --tag=CXX   --mode=link g++  -O2 -ffast-math -O2 -pipe -fomit-frame-pointer -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -L/root/garnome/lib -L/usr/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lXext -lXrender -lX11 -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lcairo -lXfixes -lpango-1.0 -lfreetype -lz -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0    -o codeblocks app.o appglobals.o compilersettingsdlg.o crashhandler.o dlgabout.o dlgaboutplugin.o environmentsettingsdlg.o infopane.o main.o prefix.o printdlg.o scriptconsole.o scriptingsettingsdlg.o splashscreen.o startherepage.o -LwxAUI -lwxaui -L../sdk -lcodeblocks -L/usr/local/lib -pthread   -L/usr/local/lib   -lwx_gtk2u-2.8  -lpthread -ldl
g++ -O2 -ffast-math -O2 -pipe -fomit-frame-pointer -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -o codeblocks app.o appglobals.o compilersettingsdlg.o crashhandler.o dlgabout.o dlgaboutplugin.o environmentsettingsdlg.o infopane.o main.o prefix.o printdlg.o scriptconsole.o scriptingsettingsdlg.o splashscreen.o startherepage.o -pthread  -L/root/garnome/lib -L/usr/local/lib -L/usr/src/codeblocks/src/src/wxAUI /usr/src/codeblocks/src/src/wxAUI/.libs/libwxaui.a /root/garnome/lib/libgtk-x11-2.0.so /root/garnome/lib/libgdk-x11-2.0.so /root/garnome/lib/libatk-1.0.so /root/garnome/lib/libgdk_pixbuf-2.0.so /root/garnome/lib/libpangocairo-1.0.so /root/garnome/lib/libglitz.so /root/garnome/lib/libpangoft2-1.0.so /root/garnome/lib/libgio-2.0.so /usr/lib/libXinerama.so /usr/lib/libXi.so /usr/lib/libXrandr.so /usr/lib/libXcursor.so /usr/lib/libXcomposite.so /usr/lib/libXext.so /usr/lib/libXdamage.so /usr/local/lib/libcairo.so /root/garnome/lib/libpixman-1.so /usr/local/lib/libpng12.so /root/garnome/lib/libXrender.so /usr/lib/libXfixes.so /usr/lib/libX11.so /usr/lib/libxcb-xlib.so /usr/lib/libxcb.so /usr/lib/libXau.so /usr/lib/libXdmcp.so /root/garnome/lib/libpango-1.0.so /root/garnome/lib/libfontconfig.so /root/garnome/lib/libfreetype.so -lz /root/garnome/lib/libexpat.so /root/garnome/lib/libgobject-2.0.so /root/garnome/lib/libgmodule-2.0.so /root/garnome/lib/libglib-2.0.so /usr/local/lib/libstdc++.so -lm -L/usr/src/codeblocks/src/sdk /usr/lib/libcodeblocks.so /usr/lib/libwxscintilla.a -lwx_gtk-2.4 -lwx_gtk2u-2.8 -lpthread -ldl   -Wl,--rpath -Wl,/root/garnome/lib -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/root/garnome/lib -Wl,--rpath -Wl,/usr/local/lib
/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lwx_gtk-2.4
collect2: ld returned 1 exit status
make[3]: *** [codeblocks] Error 1
make[3]: Leaving directory `/usr/src/codeblocks/src/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/codeblocks/src/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/codeblocks/src'
make: ***

linkerlin:
gtk-2.4 != wxGTK-2.8.9

stahta01:
wx_gtk-2.4 != gtk-2.4
In other words, I think you meant to use gtk library version 2.4.

Note, the prior gtk-2.4 != wxGTK-2.8.9; might implies they think you should remove one of two; or like me remove the wx_.

Tim S

ideasman42:
yep, I know that these are different libs.
I have "gtk+-2.14.4" and "wxGTK-2.8.9"

I also removed everything todo with wxGTK before rebuilding wxGTK and installing.
"wx-config --version" returns
2.8.9

So I'm not sure why its asking for -lwx_gtk-2.4, since it obviously knows about "-lwx_gtk2u-2.8" for eg.

stahta01:

--- Quote from: ideasman42 on November 25, 2008, 09:13:25 am ---yep, I know that these are different libs.
I have "gtk+-2.14.4" and "wxGTK-2.8.9"

I also removed everything todo with wxGTK before rebuilding wxGTK and installing.
"wx-config --version" returns
2.8.9

So I'm not sure why its asking for -lwx_gtk-2.4, since it obviously knows about "-lwx_gtk2u-2.8" for eg.


--- End quote ---

what is returned by "wx-config --libs" This is an guess on the command.
Look in "Other linker options" to confirm command.

Tim S

Also, look for stray wx_gtk-2.4 in the rest of places suggested by Morten here.

--- Quote from: MortenMacFly on November 25, 2008, 09:27:27 am ---Check the following build options in your project file:
1.) Project level: Tab "Linker settings" -> "Link libraries", "Other linker options"
2.) Target level: Tab "Linker settings" -> "Link libraries", "Other linker options"
3.) Project level: Tab "Compiler settings" -> "Other options"
4.) Target level: Tab "Compiler settings" -> "Other options"

--- End quote ---

If you still have not found the cause look at the "global compiler settings"
"Settings" -> "Compiler and debugger"
Select the correct compiler
"Linker settings" -> "Link libraries", "Other linker options"

Navigation

[0] Message Index

[#] Next page

Go to full version