社区
Linux/Unix社区
帖子详情
我的QT已经安装成功了,但编译程序时出错,提示cannot find -lqt,帮看看是什么原因呀,
kwiner
2005-04-04 03:10:27
[root@localhost myqt]# gcc -lqt -o hello hello.cpp
/usr/bin/ld: cannot find -lqt
collect2: ld returned 1 exit status
...全文
932
6
打赏
收藏
我的QT已经安装成功了,但编译程序时出错,提示cannot find -lqt,帮看看是什么原因呀,
[root@localhost myqt]# gcc -lqt -o hello hello.cpp /usr/bin/ld: cannot find -lqt collect2: ld returned 1 exit status
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
JetJoe
2005-04-25
打赏
举报
回复
楼上的正解!
joyself
2005-04-05
打赏
举报
回复
export LD_LIBRARY_PATH=$QTDIR/lib
现在的QT的文档已经很好了。
lijiangshui
2005-04-05
打赏
举报
回复
为什么不用qmake?
DanXer
2005-04-04
打赏
举报
回复
ls -d /usr/lib/qt*
看看你安了哪些版本的qt.
然后把你想用的版本的目录名加上lib目录写入/etc/ld.so.conf。 如:/usr/lib/qt-3.1/lib
运行ldconfig -v
然后再编译看看
kwiner
2005-04-04
打赏
举报
回复
一样的呀,出现一样的错误
alaiyeshi
2005-04-04
打赏
举报
回复
gcc -lqt -o hello hello.cpp
格式不对
gcc hello.cpp -lqt -o hello
#问题求助#|
Qt
|
Qt
编译过程中cannot find -l
Qt
5Widgets的错误
项目场景: 运行环境:Ubuntu18.04,
Qt
5.12.10,linux系统 问题描述: 原本之前运行OK的程序,突然出现了编译问题,后来进行了新建项目也无法顺利进行编译,错误显示为找不到-l
Qt
5Widgets,但是网上一周搜不到解决办法。 错误
提示
: error: cannot find -l
Qt
5Widgets error: collect2: error: ld returned 1 exit status error: [Test2] Error 1 现象: 图中是我..
qt
程序编译报“-1: error: cannot find -lGL”
问题: ubuntu下
安装
qt
5.9.9后,创建新程序然后编译,报错“-1: error: cannot find -lGL”。
原因
:
Qt
安装
好后,其实里面
已经
有OpenGL库了,不过库文件名字是libGLSL.so,不是标准的libGL.so。 解决办法: 使用如下命令创建软链接,然后重新编译。 ln -s /home/user/
Qt
5.9.9/Tools/
Qt
Creator/lib/
qt
creator/libGLSL.so /usr/lib/libGL.so ...
Linux的
Qt
编译出现:-1: error: cannot find -lGL问题的解决方法
在将windows平台上开发的
Qt
界面程序移植到Linux Ubuntu系统中,在构建项目
时
出现以下编译问题: error: cannot find -lGL。但是
Qt
在链接阶段查找的 OpenGL 链接库是不带版本号的。因此,可以在 /usr/lib/ 目录下为 OpenGL 链接库创建一个链接。
Qt
是支持跨平台的C++图形用户界面应用程序开发框架,在一个平台上开发好应用程序可以在多个平台方便移植。Ubuntu自带的 OpenGL 链接库在后缀中添加了版本号,例如。即,没找到libGL.so 库。
/usr/bin/ld: cannot find -l
Qt
5::Core
/usr/bin/ld: cannot find -l
Qt
5::Core /usr/bin/ld: cannot find -l
Qt
5::Gui /usr/bin/ld: cannot find -l
Qt
5::Widgets /usr/bin/ld: cannot find -l
Qt
5::Test /usr/bin/ld: cannot find -l
Qt
5::Concurrent /usr/bi...
qt
构建遇到 cannot find -l xxx 问题
1.问题:
qt
构建遇到cannot find -lxxx问题 :-1: error: cannot find -lz :-1: error: cannot find -llzma :-1: error: collect2: error: ld returned 1 exit status 2.分析:代码没有问题,库的路径问题 3.解决 cannot find -lz 3.1查找libz locate libz 3.2查找结果 /home/user/share/stone/src/tomato/lib/l
Linux/Unix社区
23,121
社区成员
74,508
社区内容
发帖
与我相关
我的任务
Linux/Unix社区
Linux/Unix社区 应用程序开发区
复制链接
扫一扫
分享
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章