Getting Xcode to recognise C++ header files without the '.h' extension (OpenSceneGraph)

こ雲淡風輕ζ 提交于 2019-12-08 17:08:00

问题


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?

Eg: No highlighting:


回答1:


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.



来源:https://stackoverflow.com/questions/10441509/getting-xcode-to-recognise-c-header-files-without-the-h-extension-openscen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!