Installing and running pbcompiler?
-
dracflamloc
- Addict

- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact:
Installing and running pbcompiler?
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
[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
Last edited by dracflamloc on Thu Nov 11, 2004 6:06 pm, edited 1 time in total.
hey dracflamloc, you could have trimmed some lines... 
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Pbcompiler errors...
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... 
-
dracflamloc
- Addict

- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact:
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?
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?
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.
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.
-
dracflamloc
- Addict

- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact:
-
dracflamloc
- Addict

- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact:
-
olejr
- Enthusiast

- Posts: 152
- Joined: Sun Jul 11, 2004 7:48 pm
- Location: Lillehammer, No(r)way
- Contact:
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..)
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..)
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
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

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
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
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
-
olejr
- Enthusiast

- Posts: 152
- Joined: Sun Jul 11, 2004 7:48 pm
- Location: Lillehammer, No(r)way
- Contact:
And a good place to find the latest rpms are: http://rpmfind.net/
And I have to stand straight and take the beating here..
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
And I have to stand straight and take the beating here..
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



