2015-04-15 48 views
4

由於更新的Xcode 6.3版本,我已經編譯C++代碼時收到以下警告:如何擺脫OSX10.10 SDK中的module.map警告?

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/module.map:1:25: warning: unknown attribute 'extern_c' [-Wignored-attributes] 
module Darwin [system] [extern_c] { 
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/module.map:1561:21: warning: unknown attribute 'extern_c' [-Wignored-attributes] 
module os [system] [extern_c] { 
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/module.map:1577:26: warning: unknown attribute 'extern_c' [-Wignored-attributes] 
module libkern [system] [extern_c] { 
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/module.map:1602:23: warning: unknown attribute 'extern_c' [-Wignored-attributes] 
module ldap [system] [extern_c] { 
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/module.map:1635:23: warning: unknown attribute 'extern_c' [-Wignored-attributes] 
module krb5 [system] [extern_c] { 
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/module.map:1662:22: warning: unknown attribute 'extern_c' [-Wignored-attributes] 
module XPC [system] [extern_c] { 
        ^

沒有人有任何想法如何解決這一問題,除了忽略-Wignored的屬性?

回答

1

原來我使用的是舊版本的clang和Xcode的SDK。使用默認的鏗鏘擺脫警告。