In my project i am getting syntax errors on lines in C files that make calls to C++ objects. My project is configured to treat all files as C++ files when building. Is this a CCS issue or a CDT issue and how can i overcome it? Below is an example of what i am seeing.
#include "AnalogInput.h"
void CFunction()
{
int voltage = AnalogInput.GetPin(AnalogInput::SupplyVoltage); //Call to C++ object throws syntax error.
}
EDIT:
I made one correction. The GetPin function takes an enum of AnalogInput called using C++ syntax. If i remove the 'AnalogInput::' then the syntax error leaves but then i get a compiler warning because it doesn't know what SupplyVoltage is. And the editor highlights AnalogInput and GetPin and SupplyVoltage not declared identifiers.