当前位置: 技术问答>linux和unix
设置QT/E环境时遇到的问题,不知道如何解决?
来源: 互联网 发布时间:2016-04-03
本文导语: arm-linux-gcc -L/root/2410sQt/target/qt-2.3.10/lib -Wl,-rpath,/root/2410sQt/targ et/qt-2.3.10/lib -o ./t1 main.o -lqte -lm /root/2410sQt/target/qt-2.3.10/lib/libqte.so: undefined reference to `operator n ew[](unsigned int)' /root/2410sQt/target/qt-2.3.10/lib/libqt...
arm-linux-gcc -L/root/2410sQt/target/qt-2.3.10/lib -Wl,-rpath,/root/2410sQt/targ
et/qt-2.3.10/lib -o ./t1 main.o -lqte -lm
/root/2410sQt/target/qt-2.3.10/lib/libqte.so: undefined reference to `operator n
ew[](unsigned int)'
/root/2410sQt/target/qt-2.3.10/lib/libqte.so: undefined reference to `operator d
elete(void*)'
/root/2410sQt/target/qt-2.3.10/lib/libqte.so: undefined reference to `__cxa_pure
_virtual'
/root/2410sQt/target/qt-2.3.10/lib/libqte.so: undefined reference to `operator d
elete[](void*)'
/root/2410sQt/target/qt-2.3.10/lib/libqte.so: undefined reference to `operator n
ew(unsigned int)'
collect2: ld returned 1 exit status
make[4]: *** [t1] Error 1
make[4]: Leaving directory `/root/2410sQt/target/qt-2.3.10/tutorial/t1'
make[3]: *** [t1] Error 2
make[3]: Leaving directory `/root/2410sQt/target/qt-2.3.10/tutorial'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/2410sQt/target/qt-2.3.10/tutorial'
make[1]: *** [sub-tutorial] Error 2
make[1]: Leaving directory `/root/2410sQt/target/qt-2.3.10'
make: *** [init] Error 2
et/qt-2.3.10/lib -o ./t1 main.o -lqte -lm
/root/2410sQt/target/qt-2.3.10/lib/libqte.so: undefined reference to `operator n
ew[](unsigned int)'
/root/2410sQt/target/qt-2.3.10/lib/libqte.so: undefined reference to `operator d
elete(void*)'
/root/2410sQt/target/qt-2.3.10/lib/libqte.so: undefined reference to `__cxa_pure
_virtual'
/root/2410sQt/target/qt-2.3.10/lib/libqte.so: undefined reference to `operator d
elete[](void*)'
/root/2410sQt/target/qt-2.3.10/lib/libqte.so: undefined reference to `operator n
ew(unsigned int)'
collect2: ld returned 1 exit status
make[4]: *** [t1] Error 1
make[4]: Leaving directory `/root/2410sQt/target/qt-2.3.10/tutorial/t1'
make[3]: *** [t1] Error 2
make[3]: Leaving directory `/root/2410sQt/target/qt-2.3.10/tutorial'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/2410sQt/target/qt-2.3.10/tutorial'
make[1]: *** [sub-tutorial] Error 2
make[1]: Leaving directory `/root/2410sQt/target/qt-2.3.10'
make: *** [init] Error 2
|
修改 makefile
把 里面所有的 gcc 改为 g++ 就行了.
operator new[](unsigned int)
这种错误是因为用 gcc去编译 C++ 程序所导致的.
把 里面所有的 gcc 改为 g++ 就行了.
operator new[](unsigned int)
这种错误是因为用 gcc去编译 C++ 程序所导致的.