windows - clang 构建 qt 的 mkspecs 是什么?

标签 windows qt clang

如果我想在 Windows 下用 gcc 构建 qt,配置选项是 -platform win32-g++,但是当我想用 clang 构建 qt 时,该选项是什么?

最佳答案

clang/windows 组合没有。我假设可以很容易地将 win32-g++ 修改为 win32-clang,但遵循 linux-g++ 和 linux-clang 之间的区别:

diff -w -u ../linux-g++/qmake.conf ./qmake.conf
--- ../linux-g++/qmake.conf 2012-11-20 16:38:28.000000000 +0100
+++ ./qmake.conf    2012-11-20 16:38:28.000000000 +0100
@@ -1,12 +1,16 @@
 #
-# qmake configuration for linux-g++
+# qmake configuration for linux-clang
 #

 MAKEFILE_GENERATOR = UNIX
-CONFIG += incremental gdb_dwarf_index
+CONFIG += incremental
+
 QMAKE_INCREMENTAL_STYLE = sublib

 include(../common/linux.conf)
 include(../common/gcc-base-unix.conf)
-include(../common/g++-unix.conf)
+include(../common/clang.conf)
+
+QMAKE_LFLAGS += -ccc-gcc-name g++
+
 load(qt_config)
 diff -w -u ../linux-g++/qplatformdefs.h ./qplatformdefs.h
--- ../linux-g++/qplatformdefs.h    2013-01-28 17:42:15.170318229 +0100
+++ ./qplatformdefs.h   2013-01-28 17:42:15.170318229 +0100
@@ -67,6 +66,7 @@
 #include <grp.h>
 #include <pwd.h>
 #include <signal.h>
+#include <dlfcn.h>

 #include <sys/types.h>
 #include <sys/ioctl.h>

关于windows - clang 构建 qt 的 mkspecs 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14578311/

相关文章:

c++ - 如何使用 C++ 在 Windows 中列出子目录?

c - 从 Windows 上的蓝牙 COM 端口获取 FILE*

c++ - Error 21 error LNK2019 : unresolved external symbol:. ...在函数:.中引用...

qt - 如何将输入和输出文件放入qtcreator

c++ - 由于错误的 strcmp 参数处理而生成警告

windows - 我可以在同一个客户端的同一个端口上与同一个服务器建立 1 个以上的 TCP 连接吗?具体到445端口

windows - UNIDRV 打印机驱动程序 - 获取自定义纸张尺寸时遇到问题

c++ - 从 Qt 访问 Windows 加密

c++ - 相同的代码由 clang 编译但在 gcc 中失败

c++ - 带有 clang 的 OpenMP