C++ include path completion for header using .hpp as a suffix

Is there any possibility to tell Xcode to include header files with a .hpp suffix in the autocompletion for include paths?

  • Yes, once you include them. Wrap the c++ methods into objective-c calls. then annotate the objective-c calls for use in swift.

Add a Comment

Replies

Sadly autocompletion for headers in C++ is completely broken in Xcode. If you search the web you'll find complaints back from Xcode 9 or 10 and Apple does not seem to care at all. As a workaround you could go to File > Project Settings and switch the Build System to Legacy and then back again. This should at least give you autocompletion for .h files. I was even able to get autocomplete for iostream once for a short fraction of a second. But I didn't get it to work with .hpp files, although this is is Xcode's standard.

Unfortunately, each version of Xcode introduces a new bug into autocompletion of headers. So, this keeps you busy filing a new bug report whenever a new version is released.

Xcode 14 solved an autocompletion bug of the previous version (additional " or > characters were added to the include path), now, autocompletion does not work at all anymore for user defined include paths. For system include paths it works in the sense that the closing > character is not added anymore.