Eclipse cannot find GTK+ libraries
- From: <polat ee bilkent edu tr>
- To: gtk-list gnome org
- Subject: Eclipse cannot find GTK+ libraries
- Date: Sat, 11 Jun 2005 16:21:54 EEST
Hi,
I'm using Fedora Core 3 and trying to compile a simple Hello World
program by using GTK+ and Eclipse 3.0.2. But Eclipse cannot find
either "config.h" or "gtk/gtk.h" (the source is given below and taken
from http://bo.majewski.name/bluear/gnu/GTK/plain/index.htm )
First I thought I didn't have GTK+ development libraries and
compiled the following libraries,
pkg-config-0.15.0, Glib-2.6.4, Atk-1.9.0, Pango-1.8.1, Gtk+-2.6.7, JPEG-6b, Libpng-1.2.8, tiff-v3.6.1.
But it didn't compile -again-.
I am stuck at the beginning.
Any help will be great.
Polat
Source:
#include <config.h>
#include <gtk/gtk.h>
static void on_destroy (GtkWidget * widget, gpointer data)
{
gtk_main_quit ();
}
int main (int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *label;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (window), 20);
gtk_window_set_title (GTK_WINDOW (window), PACKAGE " " VERSION);
gtk_window_set_default_size (GTK_WINDOW (window), 200, 50);
gtk_window_set_default_icon_from_file (PIXMAPS_DIR "/hello-icon.gif",
NULL);
g_signal_connect (G_OBJECT (window), "destroy",
G_CALLBACK (on_destroy), NULL);
label = gtk_label_new ("Hello, World");
gtk_container_add (GTK_CONTAINER (window), label);
gtk_widget_show_all (window);
gtk_main ();
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]