Photon compilation fails when using wrapper class

I am using the Adafruit ILI9341 Display library with my Photon and I and currently writing a wrapper around it.

here is the constructor defined by the library :

Adafruit_ILI9341(uint8_t CS, uint8_t RS, uint8_t RST);

Here is my wrapper’s constructor :

DisplayController(uint8_t cs, uint8_t dc, uint8_t rst, uint8_t sdcs)
    tft = Adafruit_ILI9341(cs, dc, rst);

however during compilation, I get the error :

no matching function for call to 'Adafruit_ILI9341::Adafruit_ILI9341()'

This error usually happens when you do not call to constructor with the right parameters, but as you can see it is not the case here.

What is going on?

How is your tft declared?
Have you tried the new keyword?

I guess there were some more comments given with your error mesage, please look at them too and post them here.

1 Like

yes sorry this error was from a bad declaration. I guess my c++ is rusty after all. Couldn’t find a way to delete my post, I guess I will have to be more carefull about posting next time.

Still, Thank you!

1 Like