How to compile gtk in ubuntu 12.10?

I am new to gtk programming and am stuck in my very first program. I am unable to compile the file.
I have tried the following commands and all gave same errors.

$gcc 1.first.c 'pkg-config gtk+-2.0 --cflags' 'pkg-config gtk+-2.0 --libs'

$g++ temp.c -os -s 'pkg-config gtk+-2.0 --cflags' 'pkg-config gtk+-2.0 --libs'

$gcc 1.first.c -os -s 'pkg-config gtk+-2.0 --cflags' 'pkg-config gtk+-2.0 --libs'

The error is : gcc: error: pkg-config gtk+-2.0 --cflags: No such file or directory
gcc: error: pkg-config gtk+-2.0 --libs: No such file or directory

I have also installed this:

sudo apt-get install libgtk2.0-dev

But the error continues.

I have checked my package manager using the command

package-manager --list-all

and i saw gtk2.0 in it.(I have attached the file).

What more can I do?
Please help...


P.S. Do I have to do some environment variable change?
If so, please give a detailed list of commands as I am completely unaware of the process.
P.S. I am using ubuntu 12.10 and bash shell.
 

Attachments

  • a.txt
    8.8 KB · Views: 85
Top Bottom