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.
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.
解决Qt库中未定义引用错误及添加依赖配置
本文详细介绍了如何解决Qt库中出现的未定义引用错误,并通过编辑配置文件添加必要的依赖库来解决相关问题。适用于Qt开发过程中遇到的链接错误时进行排查与修正。

被折叠的 条评论
为什么被折叠?



