GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sun Dec 21, 2014 1:53 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to compile a program (GTK+2.0) on Ubuntu Hardy?
PostPosted: Sun May 04, 2008 11:29 am 
Offline

Joined: Sun May 04, 2008 11:22 am
Posts: 3
Hello everybody,
This might seem silly to ask but did not find the solution to my question yet.
I could not get my program successfully compiled on Ubuntu, although my program was successfully compile on Fedora 8 without any warning messages.

Any one please tell me how to compile a program on Ubuntu?

Here is what I used on Fedora:
" gcc -Wall -g -o myprogram myprogram.c `pkg-config --cflags --libs gtk+-2.0` "

Thanks,
Soulivanh


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 04, 2008 4:57 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
You command looks correct. Perhaps you do not have all of the libraries installed correctly. What was the resulting error from that command?

Just to be safe, you could type in:

[code=]sudo aptitude install build-essential libgtk-2.0-dev[/code]

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
 Post subject: Ubuntu missing libgtk-2.0-dev?
PostPosted: Sun May 04, 2008 5:33 pm 
Offline

Joined: Sun May 04, 2008 11:22 am
Posts: 3
Hi,
Your suggestion was right, Ubuntu did not install the required libraries by default. After installing the " libgtk-2.0-dev", I could compile my program without an error message.
Thanks,
Soulivanh


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group