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



Hi,

Thomas Scott <tscott sierradesign com> 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




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]