GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Sep 02, 2014 9:22 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Help!error:cannot find gio/gio.h
PostPosted: Wed Aug 29, 2012 2:35 am 
Offline

Joined: Wed Aug 29, 2012 1:35 am
Posts: 1
I'm using the Ubuntu 12.04,gtk+-2.24 and glade 3.6,when I compile just like this :gcc -Wall -g -o tutorial test.c -export-dynamic `pkg-config --cflags --libs gtk+-2.0`,there is a error:/usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30:21: error: gio/gio.h:there is no such a file
I'm fresh in gtk,please help,thanks!


Top
 Profile  
 
 Post subject: Re: Help!error:cannot find gio/gio.h
PostPosted: Wed Aug 29, 2012 6:46 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 745
Location: UK
Hi,

The GIO library is a separate library from GLib so you will need to add it to the list of libraries to include. You will need to change your command line to compile your example to this. Although the use of gtk+-2.0 should pull in the GIO library. And use the module "gmodule-2.0" instead of explicitly using -export-dynamic.
Code:
gcc -Wall -g -o tutorial test.c `pkg-config --cflags --libs gtk+-2.0 gmodule-2.0 gio-2.0`


Note, check that you really have the GIO library installed properly.

_________________
E.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group