Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 24 Apr 2014, 02:35
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
GTK
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
suraj

Joined: 22 Jan 2010
Posts: 7
Location: Asia / India / Gujrat / jamnagar

PostPosted: Sun 19 Sep 2010, 14:43    Post subject:  GTK  

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...
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Mon 20 Sep 2010, 00:33    Post subject:  

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

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0336s ][ Queries: 11 (0.0043s) ][ GZIP on ]