Page 1 of 3

Installing and running pbcompiler?

Posted: Thu Nov 11, 2004 6:25 am
by dracflamloc
When I try and compile the sprite.pb example i get this:

[root@localhost sources]# pbcompiler ./sprite.pb

******************************************
PureBasic Linux x86 v3.91
******************************************

Loading external modules...
Starting compilation...
47 lines processed.
Creating the executable.
sh: gtk-config: command not found
sh: gtk-config: command not found
Requester.a(MessageRequester.o)(.text+0xd): In function `PB_MessageRequester2':
: undefined reference to `gtk_dialog_new'
Requester.a(MessageRequester.o)(.text+0x1a): In function `PB_MessageRequester2':
: undefined reference to `gtk_label_new'
Requester.a(MessageRequester.o)(.text+0x2a): In function `PB_MessageRequester2':
: undefined reference to `gtk_window_get_type'
Requester.a(MessageRequester.o)(.text+0x33): In function `PB_MessageRequester2':
: undefined reference to `gtk_type_check_object_cast'
Requester.a(MessageRequester.o)(.text+0x3c): In function `PB_MessageRequester2':
: undefined reference to `gtk_window_set_title'
Requester.a(MessageRequester.o)(.text+0x48): In function `PB_MessageRequester2':
: undefined reference to `gtk_window_get_type'
Requester.a(MessageRequester.o)(.text+0x51): In function `PB_MessageRequester2':
: undefined reference to `gtk_type_check_object_cast'
Requester.a(MessageRequester.o)(.text+0x5a): In function `PB_MessageRequester2':
: undefined reference to `gtk_window_set_modal'
Requester.a(MessageRequester.o)(.text+0x6c): In function `PB_MessageRequester2':
: undefined reference to `gtk_widget_destroy'
GtkBase.a(GtkBase.o)(.text+0x1c): In function `PB_GtkBase_Init':
: undefined reference to `gtk_init'

...and many more...

collect2: ld returned 1 exit status

- Feel the ..PuRe.. Power -

sh: ./purebasic.exe: No such file or directory




How do I fix this and get it working. Seems like it's having a gtk issue

Posted: Thu Nov 11, 2004 9:54 am
by LarsG
did you install the right GTK (and SDL) packages?

Posted: Thu Nov 11, 2004 11:32 am
by blueznl
hey dracflamloc, you could have trimmed some lines... :-)

Pbcompiler errors...

Posted: Thu Nov 11, 2004 4:25 pm
by BasicGuy
When you install gtk, it creates a gtk-config file and writes it (usually) to either the /usr/local/lib or /usr/local/include directories. It can be found in other places depending on how you installed gtk. The gtk-config file contains all the info necessary for applications to link to the gtk libraries. That's why you got that long list of undefined references... :wink:

Posted: Thu Nov 11, 2004 6:04 pm
by dracflamloc
Thanks for the replies. I'm not sure if I have the GTK/SDL libraries installed. I'm almost positive I have gtk though. I'm using fedora core 3 and I did the "everything install" of about 6 gb.

I'm a bit of a newbie to linux development outside of console C apps. Could you point me to where I can find the gtk libraries in case I don't have them? Also, if I already have the gtk-config file but pbcompiler doesn't find it, would I just create a link to the file in one of those places you mentioned it typically is?

Posted: Fri Nov 12, 2004 8:28 am
by BasicGuy
Hmm, try typing these commands at the command prompt:

updatedb <enter>

...(wait until it completes)... then

locate gtk-config <enter>

Those two commands first update the locate database and then accesses it. If the gtk-config file is present, the locate command will tell you where it is. If it's there, type ldconfig -v to update the dynamic linker table. You should see some libraries with a libgtk prefix in the list.

If they're not there, check you install program. If you're using the KDE, you may not have installed the gtk libs. You can usually go back and installed them even though you're using the KDE.

I haven't used Fedora (I'm a minimalist Debian user) but most all distros behave the same way and the commands I mentioned are common to all Linux versions I know of. Give it a shot. 8)

Posted: Sat Nov 13, 2004 8:01 pm
by dracflamloc
Thanks for the help guys I got it to work. =)

Now all I need is some sprite rotation code that works in linux.

Posted: Sun Nov 14, 2004 7:03 am
by BasicGuy
Hmm, I thought I saw a Linux-based SDL sprite lib at the SDL homesite.... 8)

Posted: Fri Jan 28, 2005 1:32 pm
by GeoTrail
I just installed Fedora V3 too and get the same errors. When I tried to install more packages from the Fedora package installer thingy I get this error:

Image

I have both GNOME and KDE installed. Any tips? Remember I'm a newbie newbie newbie Linux user ;)

Posted: Fri Jan 28, 2005 3:05 pm
by dracflamloc
What exactly are you attempting to install?

Posted: Fri Jan 28, 2005 3:18 pm
by GeoTrail
Well, I only want the pbcompiler to work as I get the same error as the message posted as the first post.
I selected everything in the dev section apart from XFCE, no clue what that is.

Posted: Fri Jan 28, 2005 6:15 pm
by olejr
Well, what I get out of your screenshot is that you need to install the non-devel rpms before trying to install the devel packages..
But you don't need, for example, KDExx to get PureBasic to work..
Isn't there a way in Fedora to select individual packages you want to install??

And if it is: search/select libgktxx And libSDLxx ...

And if it's not, well you can try this.:

pop the cd /dvd in the drive.
open a terminal, su to root.
cd /path-to-where-the-rpms-are (/mnt/...)
rpm -U libgtk*.rpm
rpm -U libSDL*.rpm
(-U for upgrade incase some are installed..)

Posted: Sat Jan 29, 2005 1:13 am
by GeoTrail
Hi Ole.
I couldn't find the libs on the DVD. Maybe I missed something but I did look in the RPM folder on the disc. Anyways, I ran a bunch of rpm lib update things :lol: and now I cannot boot into Fedora anymore.

Now I get this error when trying to boot:

/usr/bin/rhgb-client: error loading shared libraries: libglib-2.0.so.0: cannot open shared object file: no such file or directory

Guess I should keep my hands of things I don't know about :shock: :?

Posted: Sat Jan 29, 2005 2:23 am
by Fred
you will need to find the rpm for gtk-dev (or gtk2-dev) and install them.

Posted: Sat Jan 29, 2005 2:53 am
by olejr
And a good place to find the latest rpms are: http://rpmfind.net/

And I have to stand straight and take the beating here.. :cry:

In Fedora the files are:

gtk+-1.2*.rpm
gtk-devel-1.2*.rpm
gtk2-2.4*.rpm
gtk2-devel-2.4*.rpm
SDL-1.2.7*.rpm
SDL-devel-1.2.7*.rpm