troubles compiling with gcc when using pkg-config



Hi there!

I'm trying to compile the very first example from the gtk+ 2.0 tutorial
on www.gtk.org (creating an empty 200x200px window). When I'm trying to
compile it using gcc gtktest.c -o gtktest 'pkg-config --cflags gtk+-2.0'
it returns:
[..]
gcc: pkg-config --cflags gtk+-2.0: No such file or directory
[..]
But when I'm trying to compile it using the anjuta IDE and including
desired libraries it works. But, as I understood it, it's just because
anjuta is using the old way of compiling (such as 'gtk-config --cflags'
instead of pkg-config).

When I'm running the pkg-config --cflags gtk+-2.0 on it's own it returns
a bunch of include paths that seems valid. 

I tried to pass these values by hand instead of calling pkg-config but
then I got a huge list of parsing errors.. but gcc found the files at
least.. :-) 

What am I doing wrong here? (
Worth of note is that I'm originally a java developer and very new to
C.)

Regards,
-- 
David Smeringe <david smeringe telia com>




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