关于QTE4.4.2的编译问题(undefined reference to `QDnotifyFileSystemWatcherEngine::create())

rzsheng 2008-09-27 10:29:46
我在编译 qt-embedded-linux-opensource-src-4.4.2 的时候遇到如下问题,
请各位高手指点迷津,谢谢了!

/qt-embedded-linux-opensource-src-4.4.2/lib/libQtCore.so: undefined reference to `QInotifyFileSystemWatcherEngine::create()'
/qt-embedded-linux-opensource-src-4.4.2/lib/libQtCore.so: undefined reference to `QDnotifyFileSystemWatcherEngine::create()'
collect2: ld returned 1 exit status
make[3]: *** [screenshot] Error 1
make[3]: Leaving directory `/qt-embedded-linux-opensource-src-4.4.2/examples/desktop/screenshot'
make[2]: *** [sub-screenshot-make_default-ordered] Error 2
make[2]: Leaving directory `/qt-embedded-linux-opensource-src-4.4.2/examples/desktop'
make[1]: *** [sub-desktop-make_default] Error 2
make[1]: Leaving directory `/qt-embedded-linux-opensource-src-4.4.2/examples'
make: *** [sub-examples-make_default-ordered] Error 2
...全文
773 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
youthboy 2011-05-24
  • 打赏
  • 举报
回复
QInotifyFileSystemWatcherEngine::create 收藏
error1:
libQtCore.so: undefined reference to `QInotifyFileSystemWatcherEngine::create()'

resolution:
edit ./src/corelib/io/io.pri
find linux-*:
append your cross-toolchain's prefix after it

eg:
my toolchains's prefix is arm_xxxxx
so....
68 linux-*|arm*:{
69 SOURCES += \
70 io/qfilesystemwatcher_inotify.cpp \
71 io/qfilesystemwatcher_dnotify.cpp
72
73 HEADERS += \
74 io/qfilesystemwatcher_inotify_p.h \
75 io/qfilesystemwatcher_dnotify_p.h
76 }

error2:
libQtCore.so: undefined reference to `clock_gettime'

resolution:
append "-lrt" parameters after the "./configure" so that the compiler can find the define in librt.



网址:http://topic.csdn.net/u/20080927/10/1508823e-2052-45cd-9c4f-a5cf83418709.html
otis_dlut 2009-03-13
  • 打赏
  • 举报
回复
在官方网站上找的消息,还没有验证是否正确,先贴过来,给需要的人

When creating the mkspec for a embedded target if the name of the directory does not match "linux-*" then the following build error will be seen.
undefined reference to `QDnotifyFileSystemWatcherEngine::create()'
see also:
http://doc.trolltech.com/4.4/qt-embedded-crosscompiling.html#step-2-create-a-target-specific-qmake-specification
otis_dlut 2009-03-12
  • 打赏
  • 举报
回复
问题怎么解决的也不说
恶心!!!!!!!!!!
rzsheng 2008-09-28
  • 打赏
  • 举报
回复
楼上老兄的广告太多了吧
nipiao2 2008-09-28
  • 打赏
  • 举报
回复
linux 群 8709932 欢迎大家的加入
fox000002 2008-09-27
  • 打赏
  • 举报
回复
jf
rzsheng 2008-09-27
  • 打赏
  • 举报
回复
明日中午前揭帖!
rzsheng 2008-09-27
  • 打赏
  • 举报
回复
这个问题我也解决了,权当散分吧。
bshawk 2008-09-27
  • 打赏
  • 举报
回复
try QTEDIR !
rzsheng 2008-09-27
  • 打赏
  • 举报
回复
此问题已经解决,再问一个问题:

在目标板上运行QT应用程序的时候提示如下错误:
QFontDatabase: Cannot find font directory /usr/local/Trolltech/QtEmbedded-4.4.2-arm/lib/fonts - is Qt installed correctly?

为何我一定要把QT安装到那个目录:/usr/local/Trolltech/QtEmbedded-4.4.2-arm/lib/


我通过export QTDIR=/usr/local/lib
指定的环境变量为何不起作用,是不是不能改变这个路径呢?

请知道的人指教,谢谢!

23,120

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧