luowei-ustc 发表于 2014-4-4 09:49:54

安装qwt后编译工程出错

我也遇到了类似的问题root@forlinx-virtual-machine:~/2014040209# make
/witech/builddir/sdk/qtopiacore/target/bin/uic widget.ui -o ui_widget.h
arm-linux-g++ -c -fnp-rtti -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/witech/builddir/sdk/qtopiacore/target/mkspecs/qws/linux-arm-g++ -I. -I/witech/builddir/sdk/qtopiacore/target/include/QtCore -I/witech/builddir/sdk/qtopiacore/target/include/QtCore -I/witech/builddir/sdk/qtopiacore/target/include/QtNetwork -I/witech/builddir/sdk/qtopiacore/target/include/QtNetwork -I/witech/builddir/sdk/qtopiacore/target/include/QtGui -I/witech/builddir/sdk/qtopiacore/target/include/QtGui -I/witech/builddir/sdk/qtopiacore/target/include -I/usr/local/qwt-6.0.2/include -I. -I. -o main.o main.cpp
cc1plus: error: unrecognized command line option "-fnp-rtti"
make: *** Error 1
root@forlinx-virtual-machine:~/2014040209# gedit Makefile
root@forlinx-virtual-machine:~/2014040209# make
arm-linux-g++ -c -fno-rtti -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/witech/builddir/sdk/qtopiacore/target/mkspecs/qws/linux-arm-g++ -I. -I/witech/builddir/sdk/qtopiacore/target/include/QtCore -I/witech/builddir/sdk/qtopiacore/target/include/QtCore -I/witech/builddir/sdk/qtopiacore/target/include/QtNetwork -I/witech/builddir/sdk/qtopiacore/target/include/QtNetwork -I/witech/builddir/sdk/qtopiacore/target/include/QtGui -I/witech/builddir/sdk/qtopiacore/target/include/QtGui -I/witech/builddir/sdk/qtopiacore/target/include -I/usr/local/qwt-6.0.2/include -I. -I. -o main.o main.cpp
arm-linux-g++ -c -fno-rtti -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/witech/builddir/sdk/qtopiacore/target/mkspecs/qws/linux-arm-g++ -I. -I/witech/builddir/sdk/qtopiacore/target/include/QtCore -I/witech/builddir/sdk/qtopiacore/target/include/QtCore -I/witech/builddir/sdk/qtopiacore/target/include/QtNetwork -I/witech/builddir/sdk/qtopiacore/target/include/QtNetwork -I/witech/builddir/sdk/qtopiacore/target/include/QtGui -I/witech/builddir/sdk/qtopiacore/target/include/QtGui -I/witech/builddir/sdk/qtopiacore/target/include -I/usr/local/qwt-6.0.2/include -I. -I. -o widget.o widget.cpp
widget.cpp: In constructor 'Widget::Widget(QWidget*)':
widget.cpp:18: error: 'class Ui::Widget' has no member named 'qwtPlot'
widget.cpp:34: error: 'class Ui::Widget' has no member named 'qwtPlot'
widget.cpp:35: error: 'class Ui::Widget' has no member named 'qwtPlot'
make: *** Error 1
root@forlinx-virtual-machine:~/2014040209# make
/witech/builddir/sdk/qtopiacore/target/bin/uic widget.ui -o ui_widget.h
arm-linux-g++ -c -fno-rtti -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/witech/builddir/sdk/qtopiacore/target/mkspecs/qws/linux-arm-g++ -I. -I/witech/builddir/sdk/qtopiacore/target/include/QtCore -I/witech/builddir/sdk/qtopiacore/target/include/QtCore -I/witech/builddir/sdk/qtopiacore/target/include/QtNetwork -I/witech/builddir/sdk/qtopiacore/target/include/QtNetwork -I/witech/builddir/sdk/qtopiacore/target/include/QtGui -I/witech/builddir/sdk/qtopiacore/target/include/QtGui -I/witech/builddir/sdk/qtopiacore/target/include -I/usr/local/qwt-6.0.2/include -I. -I. -o widget.o widget.cpp
/witech/builddir/sdk/qtopiacore/target/bin/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/witech/builddir/sdk/qtopiacore/target/mkspecs/qws/linux-arm-g++ -I. -I/witech/builddir/sdk/qtopiacore/target/include/QtCore -I/witech/builddir/sdk/qtopiacore/target/include/QtCore -I/witech/builddir/sdk/qtopiacore/target/include/QtNetwork -I/witech/builddir/sdk/qtopiacore/target/include/QtNetwork -I/witech/builddir/sdk/qtopiacore/target/include/QtGui -I/witech/builddir/sdk/qtopiacore/target/include/QtGui -I/witech/builddir/sdk/qtopiacore/target/include -I/usr/local/qwt-6.0.2/include -I. -I. widget.h -o moc_widget.cpp
arm-linux-g++ -c -fno-rtti -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/witech/builddir/sdk/qtopiacore/target/mkspecs/qws/linux-arm-g++ -I. -I/witech/builddir/sdk/qtopiacore/target/include/QtCore -I/witech/builddir/sdk/qtopiacore/target/include/QtCore -I/witech/builddir/sdk/qtopiacore/target/include/QtNetwork -I/witech/builddir/sdk/qtopiacore/target/include/QtNetwork -I/witech/builddir/sdk/qtopiacore/target/include/QtGui -I/witech/builddir/sdk/qtopiacore/target/include/QtGui -I/witech/builddir/sdk/qtopiacore/target/include -I/usr/local/qwt-6.0.2/include -I. -I. -o moc_widget.o moc_widget.cpp
arm-linux-g++ -Wl,-rpath,/witech/builddir/sdk/qtopiacore/target/lib -o 2014040209 main.o widget.o moc_widget.o    -L/witech/builddir/sdk/qtopiacore/target/lib -L /qtqwt/qwt-6.0.2-arm/lib/ -lqwt -lQtGui -L/usr/local/tslib/lib -L/witech/builddir/sdk/qtopiacore/target/lib -lts -lQtNetwork -lQtCore -lm -lrt -ldl -lpthread
/qtqwt/qwt-6.0.2-arm/lib//libqwt.so: undefined reference to `typeinfo for QLayout'
/qtqwt/qwt-6.0.2-arm/lib//libqwt.so: undefined reference to `typeinfo for QFutureInte**ceBase'
/qtqwt/qwt-6.0.2-arm/lib//libqwt.so: undefined reference to `typeinfo for QObject'
/qtqwt/qwt-6.0.2-arm/lib//libqwt.so: undefined reference to `typeinfo for QFrame'
/qtqwt/qwt-6.0.2-arm/lib//libqwt.so: undefined reference to `typeinfo for QPaintDevice'
/qtqwt/qwt-6.0.2-arm/lib//libqwt.so: undefined reference to `typeinfo for QWidget'
/qtqwt/qwt-6.0.2-arm/lib//libqwt.so: undefined reference to `typeinfo for QPaintEngine'
/qtqwt/qwt-6.0.2-arm/lib//libqwt.so: undefined reference to `typeinfo for QPushButton'
/qtqwt/qwt-6.0.2-arm/lib//libqwt.so: undefined reference to `typeinfo for QTextDocument'
/qtqwt/qwt-6.0.2-arm/lib//libqwt.so: undefined reference to `typeinfo for QThread'
/qtqwt/qwt-6.0.2-arm/lib//libqwt.so: undefined reference to `typeinfo for QScrollArea'
collect2: ld returned 1 exit status
make: *** Error 1

飞凌怎么不解答我的问题呀

飞凌-unix 发表于 2014-4-8 08:47:13

楼主,我这里找了两个链接:http://blog.csdn.net/chenlong12580/article/details/7769433
http://www.myexception.cn/qt/1239426.html

luowei-ustc 发表于 2014-4-11 10:26:59

http://www.qtcn.org/bbs/read-htm-tid-55743.html

─╄OvЁ等待 发表于 2014-4-14 10:33:15

你是安装qwt没编译过去 还是编译自个儿的工程没过去呀??

luowei-ustc 发表于 2014-4-14 10:36:21

─╄OvЁ等待 发表于 2014-4-14 10:33 static/image/common/back.gif
你是安装qwt没编译过去 还是编译自个儿的工程没过去呀??

自己的工程,,,之前编译arm板子工程时候都是好的,现在添加了一个qwt插件,然后还是按照之前的步骤来,,,就出现这样的问题了,但是编译x86平台的时候是可以的

luowei-ustc 发表于 2014-4-14 10:38:16

luowei-ustc 发表于 2014-4-11 10:26 static/image/common/back.gif
http://www.qtcn.org/bbs/read-htm-tid-55743.html

我的错误和这个错误是一样的!

飞凌-unix 发表于 2014-4-14 11:44:08

luowei-ustc 发表于 2014-4-14 10:36 static/image/common/back.gif
自己的工程,,,之前编译arm板子工程时候都是好的,现在添加了一个qwt插件,然后还是按照之前的步骤来, ...

楼主,您还是找一下那个库文件吧

luowei-ustc 发表于 2014-4-14 11:55:46

飞凌-unix 发表于 2014-4-14 11:44 static/image/common/back.gif
楼主,您还是找一下那个库文件吧

以上是错误信息,库信息如下
root@forlinx-virtual-machine:/qtqwt/qwt-6.0.2-arm/lib# file libqwt.so.6.0.2
libqwt.so.6.0.2: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped
root@forlinx-virtual-machine:/qtqwt/qwt-6.0.2-arm/lib# ls
libqwtmathml.so    libqwtmathml.so.6.0    libqwt.so    libqwt.so.6.0
libqwtmathml.so.6libqwtmathml.so.6.0.2libqwt.so.6libqwt.so.6.0.2
root@forlinx-virtual-machine:/qtqwt/qwt-6.0.2-arm/lib# ll
total 1436
drwxr-xr-x 2 root root   4096 Apr4 09:26 ./
drwxr-xr-x 8500 users    4096 Apr4 09:25 ../
lrwxrwxrwx 1 root root       21 Apr4 09:26 libqwtmathml.so -> libqwtmathml.so.6.0.2*
lrwxrwxrwx 1 root root       21 Apr4 09:26 libqwtmathml.so.6 -> libqwtmathml.so.6.0.2*
lrwxrwxrwx 1 root root       21 Apr4 09:26 libqwtmathml.so.6.0 -> libqwtmathml.so.6.0.2*
-rwxr-xr-x 1 root root   301296 Apr4 09:26 libqwtmathml.so.6.0.2*
lrwxrwxrwx 1 root root       15 Apr4 09:26 libqwt.so -> libqwt.so.6.0.2*
lrwxrwxrwx 1 root root       15 Apr4 09:26 libqwt.so.6 -> libqwt.so.6.0.2*
lrwxrwxrwx 1 root root       15 Apr4 09:26 libqwt.so.6.0 -> libqwt.so.6.0.2*
-rwxr-xr-x 1 root root1158025 Apr4 09:26 libqwt.so.6.0.2*
root@forlinx-virtual-machine:/qtqwt/qwt-6.0.2-arm/lib#

luowei-ustc 发表于 2014-8-14 15:16:36

其实工程文件里里面已经把qwt的库文件加进去了,还是这个错误!

飞凌-unix 发表于 2014-8-14 15:29:32

http://heyunhuan513.blog.163.com/blog/static/160204220130281300150/    楼主,你看看这个博客,希望能帮助到您
页: [1]
查看完整版本: 安装qwt后编译工程出错