Mac下编译32位Qt 问题总结
来源:互联网 发布:随身淘宝皇家小地主3q 编辑:程序博客网 时间:2024/05/21 14:41
第一次在mac下编译Qt 32bit 库。无数的蛋疼。最后成功运行。
所以写一下这篇东西。不知道能不能帮到别人,但是自己记录一下。
开始直接下载:http://download.qt.io/archive/qt/5.6/5.6.0/qt-opensource-mac-x64-clang-5.6.0.dmg,
安装运行,后来公司给的外部库是32位的原因,所以用64位的Qt编译会出现:
:-1: error: symbol(s) not found for architecture x86_64
:-1: error: linker command failed with exit code 1 (use -v to see invocation)
所以需要用32位的Qt去编译,官网没有32位直接下载,所以只能自己编译。
下载:http://download.qt.io/archive/qt/5.6/5.6.1/single/qt-everywhere-opensource-src-5.6.1.tar.gz;
忘记为什么下载5.6.1了。(好像当初编译5.6.0有问题我就换了一个版本,结果5.6.1编译也有问题,这里解决的就是这些问题。)
因为第一次编什么都不懂,找到文档:http://doc.qt.io/qt-5/osx.html
运行:
./configure -platform macx-clang-32
会出错,
Project ERROR: /Users/VeCrystal/Downloads/qt-everywhere-opensource-src-5.6.1/qtbase/examples/widgets/mac/qmaccocoaviewcontainer/qmaccocoaviewcontainer.pro is lacking an install target.
make[4]: *** [sub-qmaccocoaviewcontainer-make_first] Error 3
make[3]: *** [sub-mac-make_first] Error 2
make[2]: *** [sub-widgets-make_first] Error 2
make[1]: *** [sub-examples-make_first] Error 2
make[4]: *** [sub-qmaccocoaviewcontainer-make_first] Error 3
make[3]: *** [sub-mac-make_first] Error 2
make[2]: *** [sub-widgets-make_first] Error 2
make[1]: *** [sub-examples-make_first] Error 2
make: *** [module-qtbase-make_first] Error 2
找了好久,https://codereview.qt-project.org/#/c/156610/1/mkspecs/features/qt_example_installs.prf,unified,一个外国友人回复:In short, see the bugreport. Find the file qt_example_installs.prf in the Qt sources directory. qtbase/mkspecs/features/qt_example_installs.prf. Remove the recently added error checking on line 103-115. I didn't have the time to verify if the patch changes anything else in the build.。
后来google: examples,直接说忽略编译,然后参数改成:
./configure -platform macx-clang-32 -nomake examples -nomake tests -skip qtwebengine
然后就可以编译完成。
然后这一步新人注意,install的时候需要先进入超级用户:sudo -s
然后:make install
编译的库就会默认生成在:
/usr/local/Qt-5.6.1
我直接拷贝到之前我们运行安装了的5.6.0下:/Users/XXX/Qt5.6.0/5.6/clang_32
运行Qt Creator配置32位的qmake就可以了。
0 0
- Mac下编译32位Qt 问题总结
- qt 编译问题总结
- QT 编译问题总结
- windows操作系统下:QT编译mysql驱动文件问题总结
- Mac os x下编译安装Qt
- MAC OS下Qt SDK1.2安装后出现g++-4.2问题无法编译
- WebRTC在MAC下的编译及集成QT中遇到的问题
- VS2005下编译调试保护模式32位汇编程序总结
- VS2005下编译调试保护模式32位汇编程序总结
- 回顾总结64位CentOs下安装QT遇到的问题和解决方法
- 回顾总结64位CentOs下安装QT遇到的问题和解决方法
- 回顾总结64位CentOs下安装QT遇到的问题和解决方法
- Mac下Qt连接MySQL 驱动问题
- VS2015下编译64位GDAL总结
- mac环境下cmake命令行编译总结
- mac下查看系统位64位还是32位
- MINGW64位编译QT
- mac下php7.0.9的编译安装及问题处理总结
- ACM-ICPC 知识点 经验
- android-----Login失败提示信息有误(bug)
- AFNetworking Ajax无法请求问题
- QT实现鼠标右键快捷菜单(QTableWidget)
- 如何开发高质量的软件 - 通过测试集中型的软件开发方法来提高软件质量
- Mac下编译32位Qt 问题总结
- Objective-C NSString/字符串
- 【GIT】Git SSH Key 生成步骤(git-ssh 配置和使用)
- 杭电1171(01背包+完全背包)
- 字符,字节,位
- 常见的开源软件协议
- HTTP Cookie 详解二
- SQL SERVER临时表的使用&表变量的使用
- poj2886 Who Gets the Most Candies?反素数+线段树