送分题!Qt编译的时候:cannot find -lQtUiTools

kyzww 2010-08-03 05:57:37
大家好,我是新手,刚开始使用Qt,希望大家多多指教,谢谢。
我把代码用qmake -project;qmake;make;
编译结果:
mipsel-linux-g++ -Wl,-O1 -Wl,-rpath,/box/usr/lib -o button1 autosaver.o bookmarks.o browserapplication.o browsermainwindow.o chasewidget.o cookiejar.o downloadmanager.o edittableview.o edittreeview.o history.o main.o modelmenu.o networkaccessmanager.o searchlineedit.o settings.o squeezelabel.o tabwidget.o test.o toolbarsearch.o urllineedit.o webview.o xbel.o moc_autosaver.o moc_bookmarks.o moc_browserapplication.o moc_browsermainwindow.o moc_chasewidget.o moc_cookiejar.o moc_downloadmanager.o moc_edittableview.o moc_edittreeview.o moc_history.o moc_main.o moc_modelmenu.o moc_networkaccessmanager.o moc_searchlineedit.o moc_settings.o moc_squeezelabel.o moc_tabwidget.o moc_toolbarsearch.o moc_urllineedit.o moc_webview.o qrc_data.o qrc_htmls.o -L/box/usr/lib -lQtGui -L/box/usr/lib -lQtNetwork -lQtCore -lQtWebKit -lQtUiTools -lpthread
/home/smp2/mips-4.3/bin/../lib/gcc/mips-linux-gnu/4.3.2/../../../../mips-linux-gnu/bin/ld: cannot find -lQtUiTools
collect2: ld returned 1 exit status
我的Qt安装在/nfsroot/8654root/usr下,查看/nfsroot/8654root/usr/include/QtUiTools/,下面文件为:
headers.pri private QtUiTools QUiLoader quiloader.h (蓝色为目录)
请各位高手帮忙,谢谢!


...全文
586 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
乐天游 2011-11-28
  • 打赏
  • 举报
回复
过期的题了,我今天碰到了这个问题,我先编译了/opt/qt-embedded-linux-opensource-src-4.5.3/tools/designer/uitools然后再接着make,就行了!
cycloneii 2010-08-05
  • 打赏
  • 举报
回复
交叉编译的时候是不会自动编译QtUITools的,需要你手工编译。
我做arm开发的时候也遇到类似的问题,不需要写Makefile。
即使你编译失败,但是应该已经生成了qmake文件,你用这个qmake
处理一下QTuitools的pro文件生成Makefile,然后再编译出libQtUiTools.a
因为你交叉编译的时候需要的是目标平台(mips、arm等等)的
libQtUiTools.a,而不是x86下的libQtUiTools.a
生成了目标平台的libQtUiTools.a之后,就可以继续在qt的源码目录下执行make命令了
donwmufromdying 2010-08-05
  • 打赏
  • 举报
回复
是$QTDIR/tools/QtUiTools
不是QTDIR/example/tools
楼主当初安装可能漏掉这个了?
tingsking18 2010-08-05
  • 打赏
  • 举报
回复
是$QTDIR/tools/QtUiTools
不是QTDIR/example/tools
yhf365 2010-08-05
  • 打赏
  • 举报
回复
我以前遇到类似的问题,
提示:/usr/bin/ld: cannot find -lSM:
解决:apt-get install libSM-dev

不知道LZ这种情况apt-get install QtUiTools-dev命令能否解决
tingsking18 2010-08-04
  • 打赏
  • 举报
回复
$QTDIR/tools/QtUiTools编译后才能有libQtUiTools.so.4.6.0
kyzww 2010-08-04
  • 打赏
  • 举报
回复
$QTDIR/tools下是目录文件:
codecs customcompleter inputpanel plugandpaintplugins settingseditor treemodelcompleter Makefile tools.pro
completer echoplugin README styleplugin undoframework
contiguouscache i18n plugandpaint regex
qmake;make出现错误了:
main.cpp:(.text+0x0): multiple definition of `main'
main.o:main.cpp:(.text+0x0): first defined here
basictoolsplugin.o: In function `qt_plugin_query_verification_data':
basictoolsplugin.cpp:(.text+0x68): multiple definition of `qt_plugin_query_verification_data'
echoplugin.o:echoplugin.cpp:(.text+0x30): first defined here
basictoolsplugin.o: In function `qt_plugin_instance':
basictoolsplugin.cpp:(.text+0x74): multiple definition of `qt_plugin_instance'

编译这个和缺少libQtUiTools.so.4.6.0文件有关系么?
我感觉找不到指定库的路径(-lQtUiTools),解释少了.so文件,我在$QTDIR/lib/中找不到,在Qt网站上找不到有关下载,需要重新下载安装Qt么?
我用的是Ubuntu
tingsking18 2010-08-04
  • 打赏
  • 举报
回复
cd $QTDIR/tools
qmake
make
kyzww 2010-08-04
  • 打赏
  • 举报
回复
$QTDIR/lib下全是.so文件:libQtGui.4.6.0
但是没有libQtUiTools.so

kyzww 2010-08-04
  • 打赏
  • 举报
回复
QTDIR/lib下有没有QtUiTools.lib?
没有
tingsking18 2010-08-04
  • 打赏
  • 举报
回复
QTDIR/lib下有没有QtUiTools.lib?
kyzww 2010-08-04
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 tingsking18 的回复:]
cd $QTDIR/examples/uitools
qmake
make
[/Quote]
首先谢谢tingsking18,我的uitools库是编译过的,并且.pro文件内加了CONFIG+=uitools,qmake;make,出现上面错误。
我重新编译$QTDIR/examples/uitools,
make[1]: Nothing to be done for `first'.

tingsking18 2010-08-04
  • 打赏
  • 举报
回复
cd $QTDIR/examples/uitools
qmake
make
kyzww 2010-08-04
  • 打赏
  • 举报
回复
我的QTDIR/example/tools目录下面就没有QtUiTools这个目录,你的下面有么?
我找到了libQtUiTools.a静态库,写到Makefile文件后,出现如下情况:

bin/ld: skipping incompatible /box/usr/lib/libQtUiTools.a when searching for -lQtUiTools
/home/smp2/mips-4.3/bin/../lib/gcc/mips-linux-gnu/4.3.2/../../../../mips-linux-gnu/bin/ld: cannot find -lQtUiTools

是静态库的版本问题么?-lQtUiTools这个是指定动态库还是静态库?
一、 编译安装VLC 使用vlc-1.0.5.tar.bz2 + live555-2010.01.tar.gz export MYDIR=/root/lf 将live555-2010.01.tar.gz和vlc-1.0.5.tar.bz2放置在$MYDIR下 cd $MYDIR (一) 编译liveMedia tar xvfz live555-2010.01.tar.gz cd live ./genMakefiles linux make (二) 安装libdvbpsi rpm -hiv libdvbpsi-0.1.7-1.el4.rf.i386.rpm rpm -hiv libdvbpsi-devel-0.1.7-1.el4.rf.i386.rpm 需要什么rpm可到http://apt.sw.be/redhat/el4/en/i386/rpmforge/RPMS/中下载 (三) 编译VLC 1. configure ./configure --prefix=/usr --enable-debug --disable-avcodec --disable-hal --disable-avformat --disable-swscale --disable-a52 --disable-x11 --disable-sdl --disable-fribidi --disable-dbus --disable-libgcrypt --disable-gnutls --disable-remoteosd --disable-skins2 --disable-qt4 --disable-libxml2 --disable-lua --disable-xcb --disable-alsa --disable-v4l2 --disable-qt --enable-run-as-root --enable-live555 --with-live555-tree=$MYDIR/live --disable-mad --disable-postproc --enable-dvbpsi --enable-x264 2. make 3. 出现错误error: syntax error before "vlc_spinlock_t": ../include/vlc_threads.h:240: error: syntax error before "vlc_spinlock_t" …… make[4]: *** [control/libvlc_la-vlm.lo] Error 1 make[4]: Leaving directory `/root/lf/vlc-1.0.5/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/root/lf/vlc-1.0.5/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/root/lf/vlc-1.0.5/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/lf/vlc-1.0.5' make: *** [all] Error 2 通过以下命令解决: sed -e 's/define\s*_POSIX_SPIN_LOCKS\s*/define _POSIX_SPIN_LOCKS -1 \/\/ wrong: /g' -i /usr/include/bits/posix_opt.h 4. 重试make出现error: `AFS_SUPER_MAGIC' undeclared: file.c:52:28: linux/magic.h: No such file or directory file.c: In function `IsRemote': file.c:141: error: `AFS_SUPER_MAGIC' undeclared (first use in this function) file.c:141: error: (Each undeclared identifier is reported only once file.c:141: error: for each function it appears in.) file.c:142: error: `CODA_SUPER_MAGIC' undeclared (first use in this function) file.c:143: error: `NCP_SUPER_MAGIC' undeclared (first use in this function) file.c:144: error: `NFS_SUPER_MAGIC' undeclared (first use in this function) file.c:145: error: `SMB_SUPER_MAGIC' undeclared (first use in this function) make[5]: *** [libaccess_file_plugin_la-file.lo] Error 1 make[5]: Leaving directory `/root/lf/vlc-1.0.5/modules/access' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/root/lf/vlc-1.0.5/modules/access' make[3]: *** [all] Error 2 make[3]: Leaving directory `/root/lf/vlc-1.0.5/modules/access' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/root/lf/vlc-1.0.5/modules' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/lf/vlc-1.0.5' make: *** [all] Error 2 将下面的magic.h文件复制到/usr/include/linux/目录下 5. make install 6. 检查 vlc -l | grep access_output access_output_udp UDP stream output access_output_http HTTP stream output access_output_file File stream output access_output_dummy Dummy stream output access_output_rtmp RTMP stream output vlc -l | grep dvbpsi mux_ts TS muxer (libdvbpsi) (四) 进行RTSP To TS转码:  不经视音频重编码的直接转码: vlc rtsp://172.17.0.219:8554/1 --sout '#standard{access=http, mux=ts, dst=172.17.0.100:1234}' 注:黑体部分为本机IP和端口,不能是127.0.0.1 vlc rtsp://172.17.0.219:8554/1 --sout '#duplicate{dst="std{access=udp, mux=ts, dst=172.17.1.116:1234}"}' vlc rtsp://172.17.0.219:8554/1 --sout '#duplicate{dst="std{access=http, mux=ts, dst=172.17.0.100:1234}"}' 二、 视音频重编码的VLC编译安装 (一) 需要编译安装ffmpeg ./configure --prefix=/usr --enable-libfaac --enable-libx264 --enable-pthreads --disable-ffserver --disable-ffplay --enable-gpl --enable-nonfree [root@localhost ffmpeg-0.6.7]# make common.mak:28: *** unterminated call to function `foreach': missing `)'. Stop. 出现上面错误需要更新Make版本,使用make-3.81.tar.gz ./configure --prefix=/usr;make;make install In file included from libavdevice/v4l.c:33: /usr/include/linux/videodev.h:56: error: syntax error before "ulong" /usr/include/linux/videodev.h:72: error: syntax error before '}' token 编辑/usr/include/linux/videodev.h第56行,把ulong改为 unsigned long (二) 编译VLC ./configure --prefix=/usr --enable-debug --enable-avcodec --disable-hal --disable-avformat --disable-swscale --disable-a52 --disable-x11 --disable-sdl --disable-fribidi --disable-dbus --disable-libgcrypt --disable-gnutls --disable-remoteosd --disable-skins2 --disable-qt4 --disable-libxml2 --disable-lua --disable-xcb --disable-alsa --disable-v4l2 --disable-qt --enable-run-as-root --enable-live555 --with-live555-tree=$MYDIR/live --disable-mad --disable-postproc --enable-dvbpsi --enable-x264 没有--enable-avcodec运行VLC转码会出现"cannot find video decoder"的错误。 (三) 进行RTSP To TS转码: vlc tcp://172.17.0.199:7799 --sout '#duplicate{dst="transcode{venc=x264{profile=baseline},vcodec=h264,acodec=mpga,vb=644,ab=56}:std{access=udp,mux=ts,dst=172.17.0.219:1234}"}' 使用VLC转时,不要激活转码 可正常工作的选项: :sout=#http{mux=ts,dst=:8080/1} :sout-keep :sout=#udp{mux=ts,dst=172.17.1.116:1234} :sout-keep http://www.videolan.org/doc/videolan-howto/en/ch09.html ffmpeg -i "rtsp://172.17.0.219:8554/1" -acodec libfaac -vcodec libx264 -vpre default -f mpegts -async 1 udp://127.0.0.1:3344 ./configure --prefix=/usr --enable-libfaac --enable-libx264 --enable-pthreads --disable-ffserver --disable-ffplay --enable-gpl --enable-nonfree 转码 ffmpeg -i "rtsp://172.17.0.219:8080/1" -acodec libfaac -vcodec libx264 -vpre default -f mpegts -async 1 udp://172.17.0.219:3344

16,215

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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