gtk in cygwin - Linux

This is a discussion on gtk in cygwin - Linux ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: gtk in cygwin

  1. 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

  2. Re: gtk in cygwin

    jimgardener writes:

    > 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..


    You should probably ask this sort of question on the cygwin user
    mailing list--it has nothing to do with GNU/Linux.

    > 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


    > can anyone tell me how i can get this correctly compiled?


    As the error says, pkg-config was not found, so needs adding to the
    search path.


    --
    .''`. Roger Leigh
    : :' : Debian GNU/Linux http://people.debian.org/~rleigh/
    `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
    `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.

+ Reply to Thread