回复: qtembedded的桌面系统EMD(即Embedded desktop)
#41 [zzz945 07-29 17:00]
肯定是你以前用qt4.6.2编译过产生的moc文件和.o文件没有清除, 请make clean
#42 [hangbing0203 07-30 11:20]
昨天任务已经解决了,修改Makefile 可以了。
但是现出现这样的问题了:
pdfviewer.o moc_fileselectdialog.o moc_fileselectlistwidget.o moc_PinyinFrame.o moc_testappinfo.o moc_testapplicationsmanager.o moc_testmimetype.o moc_imageviewer.o moc_testimageviewerdata.o qrc_resource.o-L/usr/local/Trolltech/Qt-4.5.2/lib -lQtTest -lQtGui -lQtCore -lpthread-lqwt-lpoppler
main.o: In function `main':
main.cpp:(.text+0x0): multiple definition of `main'
main.o:main.cpp:(.text+0x0): first defined here
main.o: In function `main':
main.cpp:(.text+0x0): multiple definition of `main'
main.o:main.cpp:(.text+0x0): first defined here
main.o: In function `main':
main.cpp:(.text+0x0): multiple definition of `main'
main.o:main.cpp:(.text+0x0): first defined here
main.o: In function `main':
main.cpp:(.text+0x0): multiple definition of `main'
main.o:main.cpp:(.text+0x0): first defined here
testappinfo.o: In function `main':
testappinfo.cpp:(.text+0x0): multiple definition of `main'
main.o:main.cpp:(.text+0x0): first defined here
testapplicationsmanager.o: In function `main':
testapplicationsmanager.cpp:(.text+0x3180): multiple definition of `main'
main.o:main.cpp:(.text+0x0): first defined here
testmimetype.o: In function `main':
testmimetype.cpp:(.text+0x0): multiple definition of `main'
main.o:main.cpp:(.text+0x0): first defined here
main.o: In function `main':
main.cpp:(.text+0x0): multiple definition of `main'
main.o:main.cpp:(.text+0x0): first defined here
main.o: In function `main':
main.cpp:(.text+0x0): multiple definition of `main'
main.o:main.cpp:(.text+0x0): first defined here
pdfviewer.o: In function `PdfViewer::~PdfViewer()':
pdfviewer.cpp:(.text+0x197): undefined reference to `Poppler::Document::~Document()'
pdfviewer.o: In function `PdfViewer::~PdfViewer()':
pdfviewer.cpp:(.text+0x207): undefined reference to `Poppler::Document::~D ..
#43 [hangbing0203 07-30 13:40]
QMapData::createData的定义在qwt找到了,请问 需要编译什么库呢 》
#44 [hangbing0203 07-30 14:34]
QMapData::createData的定义在qwt没有找到,请问 还需要编译什么库呢 》
#45 [zzz945 07-30 15:02]
1.不是已经去掉pdfview了吗, 怎么还在编译pdfview, 是不是改完.pro文件后没有运行qmake。
2.INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.5.2/include/QtCore -I/usr/local/Trolltech/Qt-4.5.2/include/QtGui -I/usr/local/Trolltech/Qt-4.5.2/include/QtTest -I/usr/local/Trolltech/Qt-4.5.2/include -I. -Iemdecorationplugin -Iemdesktopclient -Iemdesktopserver -Icommon/include -Iemdesktopserver/ MurphyPinyin -Iemdesktopserver/MurphyPinyin/scim -Iemdesktopserver/MurphyPinyin/phrase -Iapp/pdfviewer -Itests/testappinfo -Itests/testapplicationsmanager -Itests/testmimetype -Iapp/imageviewer/src -Iapp/imageviewer/tests -I.
这是main函数重定义的原因, 为什么要在顶层makefile中加入这些东西, 完全不必要修改Makefile的, 只要设好环境变量让编译器能找到正确的qt库就足够了。
3.INSTALL文件中关于qwt的内容有误, 正确做法应该是:下载并编译qwt库, 然后把qwt的src文件夹下面的
所有.h文件拷贝到"QTEDIR"/include里面, 或者在emdesktopserver.pro文件中添加INCLUDEPATH += "path of your qwt di
r"/src。还要把qwt的.so文件拷贝到"QTEDIR"/lib文件夹里。 这个错误在目前的版本中已经得到修改