Bug 65165 - gtk.h failed when i try to compile
gtk.h failed when i try to compile
Product: Red Hat Linux
Classification: Retired
Component: gtk+ (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Owen Taylor
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2002-05-18 21:05 EDT by Unmanarc
Modified: 2007-04-18 12:42 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-05-18 23:21:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Unmanarc 2002-05-18 21:05:41 EDT
From Bugzilla Helper: 
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.0.0-10; Linux) 
Description of problem: 
When I try to compile a gtk+ 1.2 application, the gtk.h is not founded. It's 
very important to create a gtk based aplications. 
Version-Release number of selected component (if applicable): 
How reproducible: 
Steps to Reproduce: 
1.Create an aplication (.c) with #include <gtk/gtk.h> 
2.compile with  gcc -Wall -g main.c -o easygtk 'gtk-config -cflags' 
'gtk-config -libs' 
Actual Results:  there is the compiler error 
[root@dhcp-1 src]# gcc -Wall -g main.c -o easygtk 'gtk-config -cflags' 
'gtk-config -libs' 
gcc: gtk-config -cflags: No existe el fichero o el directorio 
gcc: gtk-config -libs: No existe el fichero o el directorio 
main.c:3:45: gtk/gtk.h: No existe el fichero o el directorio 
"No existe el fichero o el directorio" in english is:  
-file or directory not founded 
Expected Results:  I think that gtk is on /usr/include/gtk-1.2/gtk and is not 
in /usr/include/gtk 
when I link with ln -s gtk-1.2/gtk gtk, doesn't working. 
I also ln -s gtk-1.2/gdk gdk and doesn't work. 
any suggestions? 
Additional info: 
Additional information is a simple demostration sourcecode: 
#include <gtk/gtk.h> 
gint CloseAppWindow (GtkWidget *widget, gpointer gdata) 
 g_print("Program Terminated Succesfully\n"); 
 gtk_main_quit (); 
 return (FALSE); 
void button_was_clicked (GtkWidget *widget, gpointer gdata) 
 g_print ("Button was clicked.\n"); 
int main (int argc, char *argv[]) 
 GtkWidget *window; 
 GtkWidget *button; 
 gtk_init (&argc, &argv); 
 /*Definicisn del primer widget :  window */ 
 window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 
 gtk_signal_connect( GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC 
(destroy), NULL); 
 gtk_container_border_width (GTK_CONTAINER (window), 15); 
 /*definicisn de button*/ 
 button = gtk_button_new_with_label ("Click me"); 
 gtk_signal_connect( GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC 
(button_was_clicked), NULL); 
 /*Aqadir los widgets al container*/ 
 gtk_container_add ( GTK_CONTAINER (window), button); 
 /*Hacer visibles los elementos*/ 
 gtk_widget_show (button); 
 gtk_widget_show (window); 
 /*bucle de sucesos de gtk*/ 
 return 0; 
Comment 1 Owen Taylor 2002-05-18 23:21:06 EDT
'gtk-config -cflags' 

Two things:

a) You need backticks: ` not ' as you have above
b) It's --cflags not -cflags

Hope this helps, 

Note You need to log in before you can comment on or make changes to this bug.