#include <gtk/gtk.h> not found...

I try to create for the first time in my life something using gtk. the problem is that compiler cannot see the header. But:
Code:
[ember@Universe /usr/home/ember]$ cd /usr/local/include/gtk-2.0/gtk/      
[ember@Universe /usr/local/include/gtk-2.0/gtk]$ ls -al gtk.*
-r--r--r--  1 root  wheel  7584 Nov  8 08:27 gtk.h
Is there! Any idea how to make it work?
 
Please include the command(s) you issued and the full error message you get. Right now you haven't provided enough information to tell where your problem is.

My first though, however, if that you didn't include -I/usr/local/include/gtk-2.0/ in your cc(1) command. An example command might be: % cc -I/usr/local/include -I/usr/local/include/gtk-2.0 -L/usr/local/include -lgtk-x11-2 -o file file.c
 
Ok. I didn't compile it with Geany. I change to the full header path and
Code:
gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0`
. Solved :)
 
My generic Makefile for gtk20 apps:

Code:
BINDIR   = /usr/local/bin

PROG   = gtk-app

SRCS   = main.c        # config, main()
SRCS  += dialogs.c     # dialogs

CSTD  = c99              # C standard
CFLAGS  += -ggdb    # Include debugging symbols
CFLAGS  += -I/usr/local/include
CFLAGS  += `pkg-config --cflags gtk+-2.0`

LDADD   = -L/usr/local/lib
LDADD  += -lm -lz             # extra libs go here
LDADD  += `pkg-config --libs gtk+-2.0`
LDADD  += -lgthread-2.0  # extra gnome libs go here

#we don't have any man files
NOMAN   = 1
NO_MAN   = 1

WARNS  ?= 0 # warning level

.include <bsd.prog.mk>  # using generic make/install/clean routines
 
Back
Top