加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – 如何摆脱OSX10.10 SDK中的module.map警告?

发布时间:2020-12-14 17:23:57 所属栏目:百科 来源:网络整理
导读:自从将 Xcode更新到6.3版以来,我在编译C代码时收到了以下警告: /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-a
自从将 Xcode更新到6.3版以来,我在编译C代码时收到了以下警告:

/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属性之外,有没有人知道如何解决这个问题?

解决方法

事实证明我使用旧版本的clang和Xcode的SDK.使用默认的clang删除警告.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读