I'm currently making a C++ project and have all of my application libraries built and working, no issues there. However, I've found that the indexer does not appear to be aware of any C++ header files, which manifests in at least three different ways:
- If I type "#include <alg" and try to autocomplete (Ctrl-Space), I get an error bong. I would expect it to autocomplete "#include <algorithm>". Autocomplete works fine for regular C headers.
- If I have a class member, say, "std::string my_string", and I type "(dot)" to access the class members and methods, I get a pop-up list of available class members and their types. But for my example, I would see "my_string : ?" because the indexer doesn't know that "std::string" is a type.
- If I were to then type "my_string." (note the dot), the IDE does nothing, when it should be popping up a list of std::string class members and methods.
Basically, the IDE isn't being told where the C++ standard headers are located, so it can't assist with any C++ standard library content, which is a big hassle. I drilled into the project settings (my base project was based on the SDK "local_time" example), and I came upon this:
From there you can see all the possible locations where it's pulling in header files. One location that is not being included is the C++ header file directory (.../arm-none-eabi/include/c++/9.2.1). So, I tried to fix this issue myself by adding it to the include directories, like so:
This does cause the full path (C:\TI\ccs_10.2.0\ccs\tools\compiler\gcc-arm-none-eabi-9-2019-q4-major\arm-none-eabi\include\c++\9.2.1) to appear in the preprocessor paths dialog below the two for C headers. But even after a full index rebuild, and re-resolving includes, I still can't get the IDE to figure out what a string is:
So... what gives? What's the correct way to tell the IDE where the C++ header files are? C++ editing works great in NXP MCUXpresso, so I know Eclipse is perfectly capable of doing this. (Using CCS 10.2.0 presently.) Thanks.