Strike Team
June 29th, 2008, 05:50 PM
I'm attempting to compile this program, taken from a book:
#include <gnome.h>
int main(int argc, char* argv[])
{
GtkWidget *app;
gnome_init ("example", "0,1", argc, argv);
app=gnome_app_new(("example", "Hello!");
gtk_widget_show(app);
return(0);
}
I use the following command, taken from the book:
gcc gnome1.c -o gnome1 'gnome-config --cflags --libs guomeui'
I get the following error messages:
gcc: gnome-config --cflags --libs guomeui: No such file or directory
gnome1.c:1:19: error: gnome.h: No such file or directory
gnome1.c: In function ‘main’:
gnome1.c:5: error: ‘GtkWidget’ undeclared (first use in this function)
gnome1.c:5: error: (Each undeclared identifier is reported only once
gnome1.c:5: error: for each function it appears in.)
gnome1.c:5: error: ‘app’ undeclared (first use in this function)
gnome1.c:7: error: expected ‘)’ before ‘;’ token
gnome1.c:10: error: expected ‘;’ before ‘}’ token
gnome.h is located in /usr/include/libgnomeui-2.0 on my system.
How do I get gcc to locate gnome.h and use gnome-config? All help appreciated.
#include <gnome.h>
int main(int argc, char* argv[])
{
GtkWidget *app;
gnome_init ("example", "0,1", argc, argv);
app=gnome_app_new(("example", "Hello!");
gtk_widget_show(app);
return(0);
}
I use the following command, taken from the book:
gcc gnome1.c -o gnome1 'gnome-config --cflags --libs guomeui'
I get the following error messages:
gcc: gnome-config --cflags --libs guomeui: No such file or directory
gnome1.c:1:19: error: gnome.h: No such file or directory
gnome1.c: In function ‘main’:
gnome1.c:5: error: ‘GtkWidget’ undeclared (first use in this function)
gnome1.c:5: error: (Each undeclared identifier is reported only once
gnome1.c:5: error: for each function it appears in.)
gnome1.c:5: error: ‘app’ undeclared (first use in this function)
gnome1.c:7: error: expected ‘)’ before ‘;’ token
gnome1.c:10: error: expected ‘;’ before ‘}’ token
gnome.h is located in /usr/include/libgnomeui-2.0 on my system.
How do I get gcc to locate gnome.h and use gnome-config? All help appreciated.