如何抑制这个- qglobal。h:320:6:警告:#警告“这个版本的Mac OS X不受支持”?

时间:2021-08-20 22:12:55

I am encountering the following warning

我遇到了以下警告。

/path/QtSDK/Desktop/Qt/474/gcc/include/QtCore/qglobal.h:320:6:
warning: #warning "This version of Mac OS X is unsupported"

Here is qglobal.h

这是qglobal.h

 301 #ifdef Q_OS_DARWIN
 302 #  ifdef MAC_OS_X_VERSION_MIN_REQUIRED
 303 #    undef MAC_OS_X_VERSION_MIN_REQUIRED
 304 #  endif
 305 #  define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4
 306 #  include <AvailabilityMacros.h>
 307 #  if !defined(MAC_OS_X_VERSION_10_3)
 308 #     define MAC_OS_X_VERSION_10_3 MAC_OS_X_VERSION_10_2 + 1
 309 #  endif
 310 #  if !defined(MAC_OS_X_VERSION_10_4)
 311 #       define MAC_OS_X_VERSION_10_4 MAC_OS_X_VERSION_10_3 + 1
 312 #  endif
 313 #  if !defined(MAC_OS_X_VERSION_10_5)
 314 #       define MAC_OS_X_VERSION_10_5 MAC_OS_X_VERSION_10_4 + 1
 315 #  endif
 316 #  if !defined(MAC_OS_X_VERSION_10_6)
 317 #       define MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_5 + 1
 318 #  endif
 319 #  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6)
 320 #    warning "This version of Mac OS X is unsupported"
 321 #  endif
 322 #endif

I am on 10.7 and hence the warning. But how do I suppress it?

我在10.7,因此警告。但是我该如何抑制它呢?

Also are there any serious consequences? My program is otherwise getting compiled fine.

还有什么严重的后果吗?否则我的程序会被编译的很好。

3 个解决方案

#1


2  

Why not download the latest Qt installer from:

为何不下载最新的Qt安装程序?

http://qt.nokia.com/downloads

http://qt.nokia.com/downloads

I see a "Mac OS X 10.6 or later (64-bit)" download right there on that page.

我看到的是“Mac OS X 10.6或更高版本(64位)”的下载页面。

#2


1  

Just comment these three lines out:

请把这三句话注释掉:

 319 // #  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6)
 320 // #    warning "This version of Mac OS X is unsupported"
 321 // #  endif

#3


0  

I agree with Michael Dautermann that you should install the new version, but here's another solution: change this line:

我同意Michael Dautermann的观点,你应该安装新版本,但这里有另一个解决方案:改变这条线:

   #  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6 + 1)

If that doesn't work, try adding 2 instead of 1.

如果这不起作用,尝试添加2而不是1。

#1


2  

Why not download the latest Qt installer from:

为何不下载最新的Qt安装程序?

http://qt.nokia.com/downloads

http://qt.nokia.com/downloads

I see a "Mac OS X 10.6 or later (64-bit)" download right there on that page.

我看到的是“Mac OS X 10.6或更高版本(64位)”的下载页面。

#2


1  

Just comment these three lines out:

请把这三句话注释掉:

 319 // #  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6)
 320 // #    warning "This version of Mac OS X is unsupported"
 321 // #  endif

#3


0  

I agree with Michael Dautermann that you should install the new version, but here's another solution: change this line:

我同意Michael Dautermann的观点,你应该安装新版本,但这里有另一个解决方案:改变这条线:

   #  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6 + 1)

If that doesn't work, try adding 2 instead of 1.

如果这不起作用,尝试添加2而不是1。