简体   繁体   中英

Xcode autocompletion does not work for C++ libraries included via CMake

I have an Objective-C based project with some C++ code. I have included library I want to use via CMake. However, Xcode autocompletion is not working properly for library's methods, classes and etc. Despite that, project compiles and there are no errors during build after inputting some of the library classes or functions in code. Xcode can also correctly specify the error, if I miss something like required parameters for method call (It will show up build error, telling which parameter I forgot to use). The problem is lack of autocompletion dramatically slows down the development and I need to fix it.

Considering the fact that Xcode is essentially just another UNIX make with GUI on top of it, I would advice just switching to VSCode because the C++ plugin there is designed to work with this kind of stuff.

In your case you could probably use some automatic cmake -> pbx generator if such tools even exist. Or, of course, do this manually, and configure the compilation out of an Xcode project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM