在禁用c ++模块时使用'@import',请考虑使用-fmodules和-fcxx-modules [英] use of '@import' when c++ modules are disabled, consider using -fmodules and -fcxx-modules

查看:117
本文介绍了在禁用c ++模块时使用'@import',请考虑使用-fmodules和-fcxx-modules的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试将使用Cocoapods的AdMob集成到Objective C ++项目中时,出现了这个问题.

This came up for me when I tried to integrate AdMob using Cocoapods into an Objective C++ project.

在禁用c ++模块时使用'@import',请考虑使用-fmodules和-fcxx-modules

use of '@import' when c++ modules are disabled, consider using -fmodules and -fcxx-modules

这是什么错误,我该如何解决?

What is this error and how do I fix it?

推荐答案

修复为简单,您必须按照警告中的说明进行操作,而不仅要启用C和Objective-C模块,还有C ++模块.

Fix is easy, you have to do what the warning says and not only enable C and Objective-C modules but also C++ modules.

因此,您必须将编译器标志 -fcxx-modules 添加到"Other C ++ Flags"中.在您的构建设置中

So you must add the compiler flag -fcxx-modules to "Other C++ Flags" in your Build Settings

这篇关于在禁用c ++模块时使用'@import',请考虑使用-fmodules和-fcxx-modules的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆