Hi All.
Newbie here. I have a rather complex sketch for an ESP32 board, that I am trying to divide into separate libraries. The ones, where the library class is parametized, are working well. But I also need some libraries where the Class has no parameters, but the functions inside it do. So what I did to reproduce the error I'm getting is wrote a simple library and called it from a simple sketch and I get the same error: request for member "vpr" in "test", which is of non-class type"testV1()"
here is my code:
Arduino sketch:
Arduino: 1.8.19 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, Info"
C:\Users\Adam\OneDrive\Documents\MCU\test_testV1\test_testV1.ino: In function 'void setup()':
test_testV1:6:8: error: request for member 'vpr' in 'test', which is of non-class type 'testV1()'
test.vpr(7);
^~~
exit status 1
request for member 'vpr' in 'test', which is of non-class type 'testV1()'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Arduino: 1.8.19 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, Info"
C:\Users\Adam\OneDrive\Documents\MCU\test_testV1\test_testV1.ino: In function 'void setup()':
test_testV1:6:8: error: request for member 'vpr' in 'test', which is of non-class type 'testV1()'
test.vpr(7);
^~~
exit status 1
request for member 'vpr' in 'test', which is of non-class type 'testV1()'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Thank you TheMemberFormerlyKnownAsAWOL.
I just copied your code and it compiles for me too. I will take some time to see what the differences are. I apologize, if I offended you in any way. For future refence, if you can, could you please tell me what I have done wrong in this thread, I would like to learn and not repeat my mistakes.
Best Adam
I had to send this as an edit to a reply , as I have reached my max of replies for the day
(I'm sorry (for you) that answers don't pop here with the sort of response times you expect - I have a chronic, eventually terminal, sexually-transmitted condition called "a life" which requires that I take time out for biological functions, like drinking and eating)