On 01.29 Stefano Perticoni wrote:
> Hi
> Assume makefiles are included by another in the main() dir.
> Also assume the RedHat makefile is correct couse it compiles.

Perhaps it works (compiles), but you are using things that are messing
up the compilation process and can break your Makefile even if you
update the compiler. It works by chance.

> Why the RedHat  works while the Mandrake doesn't ?

See above.

> 
> LDFLAGS  = /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/libg2c.a \

Never do this. It is supposed that gcc is smart enough to know where to
look for its own libraries. So delete that .a.

>     $(AZTEC_DIR)/lib/libaztec.a
> 
> AZ_LIBS         = -L$(AZTEC_DIR)/lib -laztec -lm

This is what LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
should contain instead.

> 
> HASRANLIB       = t
> 
> LIFEV_DIR   = $(HOME)/fem_Life_5/Software
> 
> SPARSELIB_DIR = $(LIFEV_DIR)/lib/SparseLib++/sp1_5c
> IML_DIR     = $(LIFEV_DIR)/lib/IML++
> AZTEC_DIR = $(HOME)/aztec
> 
> LIB_CPP1 = /usr/include/g++/
> LIB_CPP2 = /usr/lib/gcc-lib/i686-pc-linux-gnu/pgcc-2.91.66/include
> LIB_CPP3 = /usr/include/g++-2/
> 
> INCLUDES    =  -I$(LIFEV_DIR)/include/mesh \
>   -I$(LIFEV_DIR)/include/fe   \
>   -I$(LIFEV_DIR)/include/util \
>                 -I/usr/include/g++          \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not needed
>   -I/usr/lib/gcc-lib/i686-pc-linux-gnu/pgcc-2.91.66/include \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not needed
>   -I$(SPARSELIB_DIR)/include \
>   -I$(SPARSELIB_DIR)/mv/include \
>                 -I$(AZTEC_DIR)/lib \
>   -I$(IML_DIR)  \
>   -I$(LIB_CPP1) \
^^^^^^^^^^^^^^^^^ not needed
>   -I$(LIB_CPP2) \
^^^^^^^^^^^^^^^^^ not needed
>   -I$(LIB_CPP3)
^^^^^^^^^^^^^^^^^ not needed

You can't use includes from three diffrent versions of the standard c++
library. In fact, none of them are needed, because g++ knows where to look
for them. And you should NEVER include things like
/usr/lib/gcc-lib/i686-pc-linux-gnu, because you can mess a compiler by
forcing it to take includes or libs from a path belonging to one other.

Just do not put any of that unnecessary includes, and g++ in both RH
and MDK will know where to look for things automatically. Let the
compiler do its job.

-- 
J.A. Magallon                                                      $> cd pub
mailto:[EMAIL PROTECTED]                                          $> more beer

Linux werewolf 2.4.1-pre11 #1 SMP Mon Jan 29 01:18:32 CET 2001 i686


Reply via email to