Eclipse IDE on Windows showing errors but complies fine...
Posted: Fri Aug 20, 2021 5:46 am
I am writing some code for a OneWire device and have it working fine in C. However I would like to change it to be a class in C++ and I have it compiling fine but Eclipse is showing errors that I can't make go away. Here is the IDE showing the function in a C file:
And here is the IDE showing the exact same code except it is now in a C++ method:
The error it shows when I hover over the first marker in the begin method is: because the function is expecting an enum not an int and the cpp compiler, which is more picky about method signatures, threw an error. Once I cast it the code compiled just fine but Eclipse continues to complain about it. Any ideas why Eclipse would be complaining about the code in the C++ file but be completely fine with the same code in a C file?
And here is the IDE showing the exact same code except it is now in a C++ method:
The error it shows when I hover over the first marker in the begin method is:
The error is shows when I hover of the second marker in the write method is:Problem description: Invalid arguments ' Candidates are: void gpio_pad_select_gpio(unsigned char) '
The rest of the error markers show very similar error descriptions. I had to castProblem description: Invalid arguments ' Candidates are: int gpio_set_direction (enum {C:\Users\lehrian\Documents\esp-idf\components\hal\include\hal\gpio_types.h:7814}, enum {C:\Users\lehrian\Documents\esp-idf\components\hal\include\hal\gpio_types.h: 20385}) '
Code: Select all
(gpio_num_t)this->DS_GPIO