Compile Error Using Gtk with C++. Urgent.

2002-10-08 Thread Thomas Scott



I have searched 
everywhere and cannot find a simple example of how to successfully compile a 
.cpp (or .cc) file that includes gnome.h and has Gtk code. The 
most basic example of a working program that compiles with c 
is:

gcc `gtk-config 
--libs` `gtk-config --cflags` -o hello hello.c
If I try the 
following:

g++ `gtk-config 
--libs` `gtk-config --cflags` -o hello hello.cpp

It complains that it 
cannot find gome.h. Does anyone know what the trick is to making 
this basic example work?

Tom


Re: Compile Error Using Gtk with C++. Urgent.

2002-10-08 Thread Sven Neumann

Hi,

Thomas Scott [EMAIL PROTECTED] writes:

 I have searched everywhere and cannot find a simple example of how to
 successfully compile a .cpp (or .cc) file that includes gnome.h and has
 Gtk code.  The most basic example of a working program that compiles with c
 is:
  
 gcc `gtk-config --libs` `gtk-config --cflags` -o hello hello.c
 
 If I try the following:
  
 g++ `gtk-config --libs` `gtk-config --cflags` -o hello hello.cpp
  
 It complains that it cannot find gome.h.  Does anyone know what the trick
 is to making this basic example work?

if it has GNOME code, use gnome-config instead of gtk-config. If it
only uses GTK+ functions, include gtk/gtk.h instead of gnome.h.


Salut, Sven

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list