本文介绍了什么是mkspecs ang构建qt?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

if I want to build qt under Windows with gcc, the configure option is -platform win32-g++, but what is the option for when I want to build qt with clang?

推荐答案

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

There is none for the clang/windows combination. I assume one could easily modify win32-g++ to win32-clang though, following the differences between linux-g++ and 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>

这篇关于什么是mkspecs ang构建qt?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 08:32