Re: To link gnome apps



Ezequiel wrote:
> 
> I have read this is not a list for programmers, but perhaps someone out
> there might help me. I am trying to create my first gnome apps, using
> examples from a tutorial I found in the gnome site. The problem is, the code
> seems to compile Ok (I had to look up for gtk headers throughout the hole
> disk,though ), but when linking, the compiler does'nt find the libs for
> gtk/gnome. The tutorial says, there is a program called gtk who can tell me
> the options I need to compile and link gnome apps, as a mather of fact, you
> can use it in your make file as an argument to the compiler to avoid having
> to learn all those parameters, include and lib options, but I can't find nor
> the program neither the libs menctioned in the tutorial.
> I use RedHat 6.0 and selected C++ development and Gnome developement when
> instaling, I thougth that would be enogth to compile gnome apps. Should I
> have installed C development as wel ? Does Red Hat 6's Gnome come with all
> the stuff someone needs to develop gtk programs ?
> Thanks for all and please, escuse my English
> 
you should compile with:

gcc -o file.o `gtk-config --cflags` file.c

and link with:

gcc -o file `gtk-config --libs` file.o

and of course, you'll need to have the C compiler and libs, but I think
they are installed if you selected C++, as the C++ compiler (I think)
depends on the C compiler.




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