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 Tue 30 Jun 2015, 17:32
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message

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 

Joined: 18 May 2008
Posts: 4518

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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot attach files in this forum
You can download files in this forum

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