Unix Programming - strange compile problem with make

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > October 2004 > strange compile problem with make





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author strange compile problem with make
Billy N. Patton

2004-10-28, 5:51 pm


after I run make I get this:
copy.dal.design.ti.com 21 % make
g++ -c -g3 -Wall -Iinclude my_string.cxx
my_string.cxx:2: sstream: No such file or directory


If I copy this g++ line to the command line and execute I don't get any
errors. Everything is ok

From my Makefile
CPP = g++
INC = -Iinclude
CPPFLAGS = -g3 -O2 -Wall $(INC)

OBJ_FILES = $(LIB)(my_string.o)

..SUFFIXES:
..SUFFIXES: .cxx .cpp .c .a

all : $(LIB) \
$(addprefix $(OS)/,$(PROGRAMS))

..cxx.a : $(LIB)
$(CPP) -c $(CPPFLAGS) $<
$(AR) $(AR_OPT) $@ $*.o > /dev/null
rm $*.o

$(OS)/% : %.cxx
@if [ ! -d $(OS) ]; then \
$(MKDIR) $(OS) ; \
fi;
$(CPP) $(CPPFLAGS) $< -o $@ $(OLIBS) $(LIBS)


$(LIB) : $(OBJ_FILES)
$(AR) $(AR_CREATE_OPT) $(LIB)


--
___ _ ____ ___ __ __
/ _ )(_) / /_ __ / _ \___ _/ /_/ /____ ___
/ _ / / / / // / / ___/ _ `/ __/ __/ _ \/ _ \
/____/_/_/_/\_, / /_/ \_,_/\__/\__/\___/_//_/
/___/
Texas Instruments ASIC Circuit Design Methodology Group
Dallas, Texas, 214-480-4455, b-patton@ti.com
Billy N. Patton

2004-10-28, 5:51 pm

Billy N. Patton wrote:
>
> after I run make I get this:
> copy.dal.design.ti.com 21 % make
> g++ -c -g3 -Wall -Iinclude my_string.cxx
> my_string.cxx:2: sstream: No such file or directory
>
>
> If I copy this g++ line to the command line and execute I don't get any
> errors. Everything is ok
>
> From my Makefile
> CPP = g++
> INC = -Iinclude
> CPPFLAGS = -g3 -O2 -Wall $(INC)
>
> OBJ_FILES = $(LIB)(my_string.o)
>
> .SUFFIXES:
> .SUFFIXES: .cxx .cpp .c .a
>
> all : $(LIB) \
> $(addprefix $(OS)/,$(PROGRAMS))
>
> .cxx.a : $(LIB)
> $(CPP) -c $(CPPFLAGS) $<
> $(AR) $(AR_OPT) $@ $*.o > /dev/null
> rm $*.o
>
> $(OS)/% : %.cxx
> @if [ ! -d $(OS) ]; then \
> $(MKDIR) $(OS) ; \
> fi;
> $(CPP) $(CPPFLAGS) $< -o $@ $(OLIBS) $(LIBS)
>
>
> $(LIB) : $(OBJ_FILES)
> $(AR) $(AR_CREATE_OPT) $(LIB)
>
>



Found what the problem was.
On command line I have alias to to g++ 3.4.1
but g++ inside make calls 2.9***

--
___ _ ____ ___ __ __
/ _ )(_) / /_ __ / _ \___ _/ /_/ /____ ___
/ _ / / / / // / / ___/ _ `/ __/ __/ _ \/ _ \
/____/_/_/_/\_, / /_/ \_,_/\__/\__/\___/_//_/
/___/
Texas Instruments ASIC Circuit Design Methodology Group
Dallas, Texas, 214-480-4455, b-patton@ti.com
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com