what i mean that after all the magic is done, it ends up with a
command line like that:
cc -I. -I../../../../../include -K udk -KPIC \
-I../../../../../source/hbzlib -I/usr/include -c \
../../../_hbhbpdf.c -o_hbhbpdf.o
(wrapped for clarity). would it be too cumbersome to by some means
filter out the '-I/usr/include' part, so that it in the end it will
not be part of the actual command line?
Okay I think I see, though such filtering is already implemented.
In the final cmdline HB_INC_LIBPNG_OK is included which contains
only those dirs where png.h could be found. If it shows up in
your cmdline, chances are high there is /usr/include/png.h present.
yes, it is in there, thus explicitly specifying it's location is
redundant, as it is already covered by the stdinc paths.
the complete picture is this: (as you already know) i'm screwing
around with hb on openserver (instead of doing my day job :). there,
the compiler is schizophrenic, and has two personalities (on osr6,
that is) -- one is the "old" osr5 personality, the other is the "new"
svr5 personality. they are switched between by giving a switch to cc
(or by rearranging your path, but that doesn't matter in this case).
if compiling for the osr5 personality, stdinc changes to point to
the osr5 includes (instead of being /usr/include, for the svr5
personality). if /usr/include is explicitly added to that, there's a
chance the compiler picks up a header that is not a representation of
the lib it will link against later. if /usr/include is not specified,
it will of course just Do The Right Thing.
If you mean the wrong path may possibly be picked, you're right,
in this case the current way of solving it is to add the other
path before the std one, so that it gets picked if there. So, generally
speaking /usr/include should be the last one to be checked.
Or, you can also use HB_XBUILD macro (name subject to change) to
suppress looking into these location at all (usually used in cross-build
situations, but this one may also count as such).
Brgds,
Viktor
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour