logo       

Newbie Question: unable to compile c++ program: msg#00170

lib.uclibc.general

Subject: Newbie Question: unable to compile c++ program

Hi everybody,

I am trying to cross-compile the standard Hello World c++ program for an ARM7TDMI but failed with a

test0.cpp:1: iostream: No such file or directory

I am able to compile C programs correctly, could it be a problem with my uclibc installation? Thanks in advance for any suggestion!

Regards
Edwin Ho

here is my makefile (I also tried with no load library options)

OBJECTS=test0.o

LD_WARNING = -W1,-warn-common
LDFLAGS += --static
LDFLAGS +=$(LD_WARNING)

WARNING = -Wall

CFLAGS += -Os -fstrict-aliasing
CFLAGS += $(WARNING)

CROSS = /usr/arm-linux-uclibc-3.2/bin/arm-uclibc-

CC = $(CROSS)g++
AR = $(CROSS)ar
STRIP = $(CROSS)strip

hello: $(OBJECTS) $(CC)$(LDFLAGS) -o hello $(OBJECTS) -lstdc++ -lm -lgcc_s

test0.o: test0.cpp $(CC) $(CFLAGS) -c test0.cpp

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise