GTK

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
suraj
Posts: 7
Joined: Fri 22 Jan 2010, 08:42
Location: Asia / India / Gujrat / jamnagar

GTK

#1 Post by suraj »

I'm a beginner in linux programing..using puppy 5.1
i have downloaded and installed devx file for my puppy

now am i able to compile and run gtk programs or do i need some other development tools...

when i tried to compile a simple gtk program by

gcc prog.c -o prog pkg-config --cflags --libs gtk-unix-print-2.0

then it shows error-->

gcc:pkg-config: no such file or directory
cc1: error :unrecongnized command line option "-fcflags"
cc1:error : unrecognized command line option "-flibs"

pls help...

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#2 Post by technosaurus »

you missed the ` surrounding the pkg-config command (shift + ~ ... top left on most keyboards)
this returns the output inline

should be:
gcc prog.c -o prog `pkg-config --cflags --libs gtk-unix-print-2.0`

I trust the linker more than pkg-config for libs so I use this instead:
gcc -Os prog.c -o prog `pkg-config --cflags gtk-unix-print-2.0` -lgtk-unix-print-2.0
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply