gtk in cygwin



i am new to c programming with gcc(using cygwin on WinXP)
I have gtk in my cygwin installation (in lib\gtk-2.0)..and was trying
to compile c code that uses gtk widgets..i tried the first example
from gtk tutorial(http://www.gtk.org/tutorial/) and used

gcc mycode.c -o mycode `pkg-config --cflags --libs gtk+-2.0`
to compile it
i have pkg-config.exe in the cygwin/bin folder (which is set in
PATH)and i have set the PKG_CONFIG_PATH so i can run
pkg-config --cflags --libs gtk+-2.0 and it will generate the list of
include directories..

still i get error msg when i run the gcc command
gcc mycode.c -o mycode `pkg-config --cflags --libs gtk+-2.0`
it shows

'gcc: `pkg-config: No such file or directory
gcc: gtk-2.0`: No such file or directory
cc1: error: unrecognized command line option "-fcflags"
cc1: error: unrecognized command line option "-flibs"

can anyone tell me how i can get this correctly compiled?
jim
.



Relevant Pages

  • need help with gcc
    ... i am new to c programming with gcc(using cygwin on WinXP) ... to compile c code that uses gtk widgets.. ... 'gcc: `pkg-config: No such file or directory ...
    (comp.lang.c)
  • Re: Error when compiling with Cygwin
    ... > int main ... > But when i tryed to compile it with Cygwin. ... > gcc main.cpp -o main.exe ...
    (comp.lang.cpp)
  • Re: Compiling UMFPACK to work with Visual Studio 2008
    ... compiled UMFPACK to work under windows and using it in visual studio ... Usually I use gcc under cygwin but recently I did need to compile my ... What happened that VS can just take a library compiled by gcc and this ...
    (sci.math.num-analysis)
  • Re: Error when compiling with Cygwin
    ... > But when i tryed to compile it with Cygwin. ... > gcc main.cpp -o main.exe ... seem to be using windows, the name might be different (AFAIK, Windows ...
    (comp.lang.cpp)
  • [SLE] Gimp 1.3.18 wont finish make
    ... I am trying to compile Gimp's new version. ... *** Could not run GTK+ test program, ... See the file 'INSTALL' for help. ... The GTK+ libraries were not found at run time. ...
    (SuSE)