![]() |
gtk header problem
Hi guys, I am new to programming on linux, and I am having problems getting my first attempt at an app to compile. although I already have the lib-gtk2.0 library installed I keep getting this error when trying to compile my main.c file.
Here is the error I'm receiving... "main.c:10:21: error: gtk/gtk.h: No such file or directory" And here is what I have in my main... :
This of course is all generated by Glade so I'm assuming I am just missing some package or something? thanks for taking a look at this for me. btw: in case someone was curious, I'm working on a pidgin plugin, there was this plug-in called sendtosome in gaim that i really loved but it doesn't exist in pidgin so I decided to make it myself. |
What's your compilation command line?
|
If I recall correctly, I tried using both "gcc main.c" and "make main" and received the same error on both.
|
you need to use pkg-config for gcc to find the headers:
:
gcc `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0` main.c -o main |
ah ok, I get what you're saying, using what you gave me and a bit more research, I managed to get it past the includes. There were other errors I received later but then I found a tutorial on glade and how you are supposed to run the autogen.sh executable file and then you are able to use a "make" command and it successfully spits out an executable file which will then launch the program created in the glade designer.
This works all well and good, I have my form with controls on it and callbacks handling what I need, the app runs great. Here is my dilemma that maybe someone here can help me with... I don't want what I created in glade to be built into an executable, I need it to be built into a .so file. The reason why is because, as I mentioned in a previous post, this is going to be a plug-in for the pidgin messenger client and in order to use it as a plug-in it must be built into a .so not an executable. I know I could go the long way and not use glade to do all the form coding for me, but I'd rather not if I can avoid it, does anyone know a way to do this? thanks a lot for the help. |
sorry, to be more specific and to the point, I want glade to output a dynamic library or shared library. any idea how to do that?
|
| All times are GMT -5. The time now is 2:56 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC