[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] user-app: "undefined reference to 'operator new[] (unsigned long)" ??



I'm starting out with a simple one-file c++ utility.  I created a project using petalinux-new-app, then replaced ulocate.c with my existing ulocate.cpp.  The only change I made to Makefile is

CC=g++

and
%.o: %.cpp
    $(CC) -c $(CFLAGS) -o $@ $<

When I build, I fail with:
g++ -c -Os -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall  -mno-xl-soft-div -mxl-barrel-shift -mcpu=v7.20.a -mxl-multiply-high -mno-xl-soft-mul -mhard-float  -DEMBED -I/home/petalinux-v0.40-rc3/software/petalinux-dist -I/home/petalinux-v0.40-rc3/software/petalinux-dist/include -I/home/petalinux-v0.40-rc3/software/petalinux-dist/include -Dlinux -D__linux__ -Dunix -DLINUX -o ulocate.o ulocate.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
cc1plus: error: unrecognized command line option "-mno-xl-soft-div"
cc1plus: error: unrecognized command line option "-mxl-barrel-shift"
cc1plus: error: unrecognized command line option "-mxl-multiply-high"
cc1plus: error: unrecognized command line option "-mno-xl-soft-mul"
ulocate.cpp:1: error: bad value (v7.20.a) for -mtune= switch
make: *** [ulocate.o] Error 1

I'm guessing that I'm picking the wrong way to tell the system to build with g++ ??  If not, how do I get access to CFLAGS ?  I hate to just redefine it explicitly, given all the special switches that are included.

___________________________ microblaze-uclinux mailing list microblaze-uclinux@xxxxxxxxxxxxxx Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/