GTK libraries not found

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

GTK libraries not found

Post by lisoformio »

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: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: GTK libraries not found

Post by dkl »

Hi,

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

Re: GTK libraries not found

Post by lisoformio »

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: 3454
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: GTK libraries not found

Post by marcov »

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: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: GTK libraries not found

Post by dkl »

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

Post by lisoformio »

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

tnx!

What a newbie! :)
Post Reply