GTK libraries not found

New to FreeBASIC? Post your questions here.
lisoformio
Posts: 9
Joined: Sep 16, 2015 15:57

GTK libraries not found

Postby lisoformio » Sep 16, 2015 16:21

Hi all,

I' really newbie with freeBasic.
I'm trying to compile a freeBasic project wit GTK+ and gtk.bi

Well... the following code:

#define __USE_GTK3__
#include once "gtk/gtk.bi"

generate the following:

fbc -w all
ld: cannot find -lgtk-3
ld: cannot find -lgdk-3
Compilation failed

I'm using freebasic 1.00.0 compiler and Geany 1.25 as IDE in Ubuntu 12.04 LTS.

Which libraries do I need?

regards
dkl
Site Admin
Posts: 3209
Joined: Jul 28, 2005 14:45
Location: Germany

Re: GTK libraries not found

Postby dkl » Sep 16, 2015 22:30

Hi,

I think it's just
libgtk-3-dev
lisoformio
Posts: 9
Joined: Sep 16, 2015 15:57

Re: GTK libraries not found

Postby lisoformio » Sep 17, 2015 11:58

On my system I found

1) gtk-3.so.0
2) gdk-3.so.0

I made a copy and renamed in

1) gtk-3.so
2) gdk-3.so

Now with the __USE_GTK3__ I can compile.

Is there a way to #ìnclib libraries with name like <libname>.so.X.Y.Z ?
marcov
Posts: 2779
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: GTK libraries not found

Postby marcov » Sep 17, 2015 13:03

lisoformio wrote:On my system I found
Is there a way to #ìnclib libraries with name like <libname>.so.X.Y.Z ?


Install the corresponding development package as dkl says. It creates a symlink from the .so to .so.x.y.z
dkl
Site Admin
Posts: 3209
Joined: Jul 28, 2005 14:45
Location: Germany

Re: GTK libraries not found

Postby dkl » Sep 17, 2015 13:41

I meant that you probably have to install the Ubuntu package with that name, which should set everything up as needed:
sudo apt-get install libgtk-3-dev
lisoformio
Posts: 9
Joined: Sep 16, 2015 15:57

Re: GTK libraries not found

Postby lisoformio » Sep 17, 2015 14:11

I installed libgtk-3-dev and it compile OK.

tnx!

What a newbie! :)

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 44 guests