让Xcode识别没有'.h'扩展名的C ++头文件(OpenSceneGraph) [英] Getting Xcode to recognise C++ header files without the '.h' extension (OpenSceneGraph)

查看:359
本文介绍了让Xcode识别没有'.h'扩展名的C ++头文件(OpenSceneGraph)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OpenSceneGraph使用头文件,不带.h扩展名 。有没有办法让Xcode识别语法为C ++,因此允许我突出显示和跳转到定义等?

OpenSceneGraph uses header files without the '.h' extension. Is there a way of getting Xcode to recognise the syntax as C++ and therefore allow me to have highlighting and jumping to definitions etc?

例如:没有高亮: / em>

Eg: No highlighting:

p>

推荐答案

是的。切换右面板(工具栏中的视图部分的最右边的图标,屏幕截图中的箭头1),并选择您的文件。选择面板中的文档选项卡(箭头2),然后在身份和类型(箭头3)下找到文件类型。在下拉列表中选择C + +头文件。

Yes. Toggle the right panel (the rightmost icon of the "View" section of the toolbar, arrow 1 in the screenshot) with your file selected. Select the document tab in the panel (arrow 2), then find "File Type" under "Identity and Type" (arrow 3). Choose "C++ header" in the dropdown list.

您需要重新打开文件以使用语法着色。

You will need to reopen the file for the syntax coloring to kick in.

这篇关于让Xcode识别没有'.h'扩展名的C ++头文件(OpenSceneGraph)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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