src/box.cpp:151: undefined reference to `operator new[](unsigned int)'

[root@demo arm]# make
arm-hisiv300-linux-gcc -O2 -g -I/home/Hi3516A/demo/openssl-1.0.1p/include/ -c -o objs/box.o ..//src/box.cpp -I./libs/hisiv300-hi3516a-mpp030/include/ -Dhi3516a -DHICHIP=0x3516A100 -DHI_DEBUG -DHI_XXXX -DISP_V2 -D__STDC_CONSTANT_MACROS -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations
..//src/box.cpp:41:15: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
 char *rtmpurl="rtmp://114.215.121.106:1935/live/540_17";
               ^
arm-hisiv300-linux-gcc -O2 -g -I/home/Hi3516A/demo/openssl-1.0.1p/include/ -c -o objs/hi3516a_comm_audio.o ..//src/hi3516a_comm_audio.cpp -I./libs/hisiv300-hi3516a-mpp030/include/ -Dhi3516a -DHICHIP=0x3516A100 -DHI_DEBUG -DHI_XXXX -DISP_V2 -D__STDC_CONSTANT_MACROS -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations
arm-hisiv300-linux-gcc -O2 -g -I/home/Hi3516A/demo/openssl-1.0.1p/include/ -c -o objs/hi3516a_comm_sys.o ..//src/hi3516a_comm_sys.cpp -I./libs/hisiv300-hi3516a-mpp030/include/ -Dhi3516a -DHICHIP=0x3516A100 -DHI_DEBUG -DHI_XXXX -DISP_V2 -D__STDC_CONSTANT_MACROS -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations
arm-hisiv300-linux-gcc -O2 -g -I/home/Hi3516A/demo/openssl-1.0.1p/include/ -c -o objs/hi3516a_comm_venc.o ..//src/hi3516a_comm_venc.cpp -I./libs/hisiv300-hi3516a-mpp030/include/ -Dhi3516a -DHICHIP=0x3516A100 -DHI_DEBUG -DHI_XXXX -DISP_V2 -D__STDC_CONSTANT_MACROS -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations
arm-hisiv300-linux-gcc -O2 -g -I/home/Hi3516A/demo/openssl-1.0.1p/include/ -c -o objs/hi3516a_comm_vi.o ..//src/hi3516a_comm_vi.cpp -I./libs/hisiv300-hi3516a-mpp030/include/ -Dhi3516a -DHICHIP=0x3516A100 -DHI_DEBUG -DHI_XXXX -DISP_V2 -D__STDC_CONSTANT_MACROS -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations
arm-hisiv300-linux-gcc -O2 -g -I/home/Hi3516A/demo/openssl-1.0.1p/include/ -c -o objs/hi3516a_comm_vpss.o ..//src/hi3516a_comm_vpss.cpp -I./libs/hisiv300-hi3516a-mpp030/include/ -Dhi3516a -DHICHIP=0x3516A100 -DHI_DEBUG -DHI_XXXX -DISP_V2 -D__STDC_CONSTANT_MACROS -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations
arm-hisiv300-linux-gcc -O2 -g -I/home/Hi3516A/demo/openssl-1.0.1p/include/ -c -o objs/hi35xxx_enc.o ..//src/hi35xxx_enc.cpp -I./libs/hisiv300-hi3516a-mpp030/include/ -Dhi3516a -DHICHIP=0x3516A100 -DHI_DEBUG -DHI_XXXX -DISP_V2 -D__STDC_CONSTANT_MACROS -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations
arm-hisiv300-linux-gcc  -O2 -g -I/home/Hi3516A/demo/openssl-1.0.1p/include/ -o box objs/box.o objs/hi3516a_comm_audio.o objs/hi3516a_comm_sys.o objs/hi3516a_comm_venc.o objs/hi3516a_comm_vi.o objs/hi3516a_comm_vpss.o objs/hi35xxx_enc.o ./libs/hisiv300-hi3516a-mpp030/lib/libmpi.a ./libs/hisiv300-hi3516a-mpp030/lib/libVoiceEngine.a ./libs/hisiv300-hi3516a-mpp030/lib/libvqev2.a ./libs/hisiv300-hi3516a-mpp030/lib/libresampler.a ./libs/hisiv300-hi3516a-mpp030/lib/libdvqe.a ./libs/hisiv300-hi3516a-mpp030/lib/libisp.a ./libs/hisiv300-hi3516a-mpp030/lib/lib_cmoscfg.a ./libs/hisiv300-hi3516a-mpp030/lib/lib_iniparser.a ./libs/hisiv300-hi3516a-mpp030/lib/lib_hiae.a ./libs/hisiv300-hi3516a-mpp030/lib/lib_hiawb.a ./libs/hisiv300-hi3516a-mpp030/lib/lib_hiaf.a ./libs/hisiv300-hi3516a-mpp030/lib/lib_hidefog.a ./libs/hisiv300-hi3516a-mpp030/lib/libfaac.a ./libs/hisiv300-hi3516a-mpp030/lib/librtmp.a  -lpthread -lm -lrt -Llibrtmp -lrtmp -lssl -lcrypto -lz  -Dhi3516a -DHICHIP=0x3516A100 -DHI_DEBUG -DHI_XXXX -DISP_V2 -D__STDC_CONSTANT_MACROS -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations
./libs/hisiv300-hi3516a-mpp030/lib/librtmp.a(rtmp.o): In function `add_addr_info.isra.3':
rtmp.c:(.text+0x980): warning: gethostbyname is obsolescent, use getnameinfo() instead.
objs/box.o: In function `StartPCM2AAC()':
/home/Hi3516A/demo/New/Hi3516aDemo/arm/..//src/box.cpp:151: undefined reference to `operator new[](unsigned int)'
collect2: error: ld returned 1 exit status

make: *** [box] 错误 1

【原因】:
原因是Makefile 里的LINK 项应该为g++ 而不是gcc , 修改


你可能感兴趣的:(src/box.cpp:151: undefined reference to `operator new[](unsigned int)')