Code::Blocks

User forums => Using Code::Blocks => Topic started by: Boder on February 13, 2005, 05:40:57 am

Title: Hit Snag in Makefile - help -lwx_gtk2_xrc
Post by: Boder on February 13, 2005, 05:40:57 am
Everything was going peachy until this linking part. Here is the error, I added an echo in the Makefile to see the exact line.

Linking executable devel\codeblocks.exe...
g++ -o devel/codeblocks.exe -L/usr/lib -Ldevel -Lsdk/tinyxml src/.objs/prefix.o src/.objs/app.o src/.objs/dlgabout.o src/.objs/dlgaboutplugin.o src/.objs/environmentsettingsdlg.o src/.objs/main.o -lcodeblocks -lwx_gtk2_xrc-2.4 -lwx_gtk2_stc-2.4 -pthread -Wl,-rpath -Wl,/usr/lib -lwx_gtk2-2.4 -mwindows
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/bin/ld: cannot find -lwx_gtk2_xrc-2.4
collect2: ld returned 1 exit status
make: *** [devel/codeblocks.exe] Error 1

I have wxGTK 2.4.2. What other libraries do I need? Any ideas? Thank you, I really want to try Code::Blocks. :D
Title: Hit Snag in Makefile - help -lwx_gtk2_xrc
Post by: mandrav on February 13, 2005, 09:15:11 am
You need the contrib libs for wxGTK, especially XRC and STC. If you tell us what kind of distro you have, we might be able to tell you what's the package's name.

Yiannis.
Title: SUSE 9.1
Post by: Boder on February 14, 2005, 04:52:44 am
I'm running SUSE 9.1. I installed wxGTK from the .rpm packages at ftp.suse.com. Here is what YaST shows when I search for "wx"

<a href="http://tinypic.com/1q3myu">Link to Image</a>
Title: Hit Snag in Makefile - help -lwx_gtk2_xrc
Post by: mandrav on February 14, 2005, 09:26:55 am
I have the feeling that the SuSE RPMs, are for GTK1. Codeblocks builds only with GTK2.
I will install SuSE here, check out all the needed prerequisites and then I 'll come back to you...

Yiannis.
Title: Hit Snag in Makefile - help -lwx_gtk2_xrc
Post by: Anonymous on February 14, 2005, 07:18:45 pm
Okay, update time ! Yay!

I tried compiling on Ubuntu "Warty Warthog" but the wx packages were linked against gtk1 so that crashed a nd burned early. So I went back to SUSE and switched to the 9.2 directory to get packages. Now the wx_gtk version is 2.5. So I tried making code::blocks hit the first snag before finding the wxSingleChoiceDialog "fix" then I got to the last step... linking  :) but now it gives me undef. refs.

Compiling src\main.cpp...
Linking executable devel\codeblocks.exe...
g++ -o devel/codeblocks.exe -L/usr/lib -Ldevel -Lsdk/tinyxml src/.objs/prefix.o src/.objs/app.o src/.objs/dlgabout.o src/.objs/dlgaboutplugin.o src/.objs/environmentsettingsdlg.o src/.objs/main.o -lcodeblocks -lwx_gtk2_xrc-2.5 -lwx_gtk2_stc-2.5 -pthread -L/usr/X11R6/lib -Wl,-rpath -Wl,/usr/lib -lwx_gtk2_html-2.5 -lwx_gtk2_dbgrid-2.5 -lwx_gtk2_adv-2.5 -lwx_gtk2_core-2.5 -lwx_base_odbc-2.5 -lwx_base_xml-2.5 -lwx_base_net-2.5 -lwx_base-2.5 -mwindows
/usr/lib/libwx_gtk2_core-2.5.so: undefined reference to `gdk_display_get_default_cursor_size'
/usr/lib/libwx_gtk2_core-2.5.so: undefined reference to `pango_font_family_is_monospace'
/usr/lib/libwx_gtk2_core-2.5.so: undefined reference to `gtk_button_set_alignment'
/usr/lib/libwx_gtk2_core-2.5.so: undefined reference to `gtk_entry_set_alignment'
collect2: ld returned 1 exit status
make: *** [devel/codeblocks.exe] Error 1
Title: Hit Snag in Makefile - help -lwx_gtk2_xrc
Post by: Anonymous on February 18, 2005, 01:28:51 am
Okay I got Code::Blocks to compile on Ubuntu Warty Warthog, but I can't get it to run.

Let me make sure I'm correct here... Code::Blocks has to compile with wxWindows-2.4.2 with is compiled against GTK2, even though wxWindows-2.4.2 is compiled against GTK1 by default? And it doesn't compile with wxWindows-2.5?

I got it compile against 2.4.2 with GTK1, but I haven't got it to run. Do I have to copy libcodeblocks.so to /usr/lib? When I run codeblocks.exe from the devel folder, it says that it can't find Resources.zip or something.
Title: Hit Snag in Makefile - help -lwx_gtk2_xrc
Post by: mandrav on February 18, 2005, 08:56:07 am
It doesn't run with GTK1, it segfaults (if someone knows why, please share).
This is what I do:

Title: Hit Snag in Makefile - help -lwx_gtk2_xrc
Post by: Anonymous on February 21, 2005, 03:13:12 pm
Hi,
 is it possible to have binaries for Linux as *.rpm ?

Thanks
Title: Hit Snag in Makefile - help -lwx_gtk2_xrc
Post by: mandrav on February 24, 2005, 09:16:21 am
Yes, as long as someone provides them that is...

Yiannis.
Title: Hit Snag in Makefile - help -lwx_gtk2_xrc
Post by: ilkapo on March 16, 2005, 05:43:46 pm
I've installed wxGTK with yum on Fedora Core 3 from freshrpms, i create a new yum repository in "/etc/yum.repos.d/" named "freshrpms.repo" with the following lines:

Code: [Select]
[freshrpms]
name=Fedora Linux $releasever - $basearch - freshrpms
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms
gpgcheck=0


than I can install wxGTK

Code: [Select]
yum install wxGTK
yum install wxGTK-devel

Before execute the make command we must change 3 lines in the "Makefile.unix" (changing from gtk2 to gtk):

Code: [Select]
LIB_WX=wx_gtk-$(WX_VER)

LIB_WXSTC=wx_gtk_stc-$(WX_VER)

LIB_WXXRC=wx_gtk_xrc-$(WX_VER)


Now you can run the make command

Code: [Select]
make -f Makefile.unix

before run "make update" yum must use the dos2unix command:

Code: [Select]
dos2unix -n update update.unix
./update.unix


And now yuo can run codeblocks with the "run.sh" script in the "output" directory!