Re: [gtk-osx-users] compiling sample in GCC 4.2.1 - macbook pro core i7 10.6.8





2011/12/1 Érico <ericomtx gmail com>
Cool

Thks John !!

I DID miss the shell step

now it worked

I was trying to compile directly in terminal

I appreciate !!
Regards
Érico


2011/12/1 John Ralls <jralls ceridwen us>

On Dec 1, 2011, at 6:42 AM, Érico wrote:

Hi

I have just completed building GTK-OSX from :

 http://live.gnome.org/GTK%2B/OSX/Building

now I am trying to compile a sample from :

http://developer.gnome.org/gtk-tutorial/stable/c39.html

when I run the command  :

gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0`


It gives an error :

 ericomtx$ gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0`
-bash: pkg-config: command not found
base.c:1:21: error: gtk/gtk.h: No such file or directory
base.c: In function ‘main’:
base.c:6: error: ‘GtkWidget’ undeclared (first use in this function)
base.c:6: error: (Each undeclared identifier is reported only once
base.c:6: error: for each function it appears in.)
base.c:6: error: ‘window’ undeclared (first use in this function)
base.c:10: error: ‘GTK_WINDOW_TOPLEVEL’ undeclared (first use in this function)

How can I set my $GTK_PATH/inst/share/pkgconfig to GCC ?

I do have 3 files stored in this directory :

gnome-doc-utils.pc
gtk-doc.pc
xml2po.pc

Is that correct ? I mean is that the content that need to be installed on it ?


No, it's not correct. It appears that either you didn't follow the instructions very well and are well short of having a Gtk installation to work with or you missed one important step before starting the tutorial: As the instructions say, any manual work must be done in a "jhbuild shell" -- which you enter with the command "jhbuild shell". That will set up your environment correctly so that $PATH includes your gtk-osx installation prefix bin directory (where pkg-config lives) and PKG_CONFIG_PATH to point to $PREFIX/lib/pkgconfig so that pkg-config can find the pc files for all of your packages.

Regards,
John Ralls






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]