Not sure if this question belongs here or in [expert], so I'll start here
since I've just subscribed to both.

I am a fairly recent Mandrake 7.1 user.  After purchasing "GTK+ / Gnome
Applications Development" I needed to install the various support libraries.
I used RPMDrake and installed a bunch of developer libs that came on the MD
7.1 CDs.

I tried compiling a simple "hello world" program with the addition of the
line
        #include <gnome.h>

This was done to check header dependencies.  I got an error along the lines
of "glibconfig.h not found".  I know that glibconfig.h exists at the path
/usr/lib/glib/include/glibconfig.h.

glibconfig.h is referenced in various GTK headers as
        #include <glibconfig.h>

This would lead me to believe that any GTK app compiles will have to be done
with -I options pointing to "/usr/lib/glib/include" (and a lot o others as
well).

So I assume that I was quite naive to try the compile with the simple
command
        cc foo.c

The questions:

(1) Is it normal practice to just use a simple "#include <name.h>" statement
in .C and .H files and then use -I options for the root paths?  That seems
to be the case.

(2) Would it be considered good style to globally define include options
sets at the shell level so that you can have them quickly in any simple
makefile or do most people define over and over again in each makefile.   I
realize that doing the former will tie the makefile to a particular user
environment, but I am curious.

Cheers and thanks,
-rick



Reply via email to