Xcode 11 头文件问题 [英] Xcode 11 header file issue

查看:31
本文介绍了Xcode 11 头文件问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对在 C++ 开发中使用 Xcode 还很陌生.出于某种原因,编译器没有正确处理 .h 文件.它没有正确着色代码,也没有突出显示编译时错误.我尝试查看设置以查看是否可以更改此设置,我发现它默认将 .h 文件视为 c-headers.我将其更改为其中一个中的 C++ 头文件以查看这是否有帮助,然后关闭项目并重新打开.没什么.

I'm pretty new to using Xcode with C++ development. For some reason, the compiler isn't treating .h files correctly. It doesn't color code correctly, nor does it highlight compile-time errors. I've tried looking through the settings to see if I can change this, and I found that it treats .h files by default as c-headers. I changed this to C++ header file in one of them to see if this would help, and then closed the project and reopened. Nothing.

推荐答案

也许尝试将您的文件重命名为 .hpp ?

Maybe try to rename your files to .hpp ?

这篇关于Xcode 11 头文件问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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