GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to compile a program (GTK+2.0) on Ubuntu Hardy?

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
sanothay



Joined: 04 May 2008
Posts: 3

PostPosted: Sun May 04, 2008 11:29 am    Post subject: How to compile a program (GTK+2.0) on Ubuntu Hardy? Reply with quote

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
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 427
Location: Portland, OR USA

PostPosted: Sun May 04, 2008 4:57 pm    Post subject: Reply with quote

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: (Plaintext)
1
sudo aptitude install build-essential libgtk-2.0-dev
Back to top
sanothay



Joined: 04 May 2008
Posts: 3

PostPosted: Sun May 04, 2008 5:33 pm    Post subject: Ubuntu missing libgtk-2.0-dev? Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP