spaceAngel / cyberWatch

simple OS for LillyGO T-Watch V3
https://cyberwatch.cyberdeck.cz
GNU General Public License v3.0
32 stars 8 forks source link

Errors in compilation #5

Closed MrRolid closed 1 year ago

MrRolid commented 1 year ago

Hi I have compilation errors. I have a clean install of VSC and I'm a complete noob :) image

Compiling .pio\build\ttgo-t-watch\src\UserInterface\WatchFaces\KnightRiderComponents\KnightRiderBatteryBar.cpp.o Compiling .pio\build\ttgo-t-watch\src\UserInterface\WatchFaces\KnightRiderComponents\KnightRiderButton.cpp.o In file included from src\UserInterface\Apps\SettingsPanel.h:6:0, from src\UserInterface\Apps\SettingsPanel.cpp:3: src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:15:9: error: 'std::function' has not been declared std::function<bool(void)> isActiveFunc, ^ src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:15:17: error: expected ',' or '...' before '<' token std::function<bool(void)> isActiveFunc, ^ src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:31:8: error: 'function' in namespace 'std' does not name a template type std::function<bool()> isActiveFunc; ^ src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:32:8: error: 'function' in namespace 'std' does not name a template type std::function<void()> handleTouchFunc; ^ In file included from src\UserInterface\Apps\SettingsPanel.cpp:3:0: src\UserInterface\Apps\SettingsPanel.h: In constructor 'SettingsPanel::SettingsPanel()': src\UserInterface\Apps\SettingsPanel.h:24:4: error: no matching function for call to 'SettingsPanelButton::SettingsPanelButton(const char [8], int, int, SettingsPanel::SettingsPanel()::<lambda()>, SettingsPanel::SettingsPanel()::<lambda()>)' ); ^ In file included from src\UserInterface\Apps\SettingsPanel.h:6:0, from src\UserInterface\Apps\SettingsPanel.cpp:3: src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:11:3: note: candidate: SettingsPanelButton::SettingsPanelButton(char, uint8_t, uint8_t, int) SettingsPanelButton( ^ src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:11:3: note: candidate expects 4 arguments, 5 provided src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate: constexpr SettingsPanelButton::SettingsPanelButton(const SettingsPanelButton&) class SettingsPanelButton : public Component { ^ src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate expects 1 argument, 5 provided src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate: constexpr SettingsPanelButton::SettingsPanelButton(SettingsPanelButton&&) src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate expects 1 argument, 5 provided In file included from src\UserInterface\Apps\SettingsPanel.cpp:3:0: src\UserInterface\Apps\SettingsPanel.h:29:4: error: no matching function for call to 'SettingsPanelButton::SettingsPanelButton(const char [5], int, int, SettingsPanel::SettingsPanel()::<lambda()>, SettingsPanel::SettingsPanel()::<lambda()>)' ); ^ In file included from src\UserInterface\Apps\SettingsPanel.h:6:0, from src\UserInterface\Apps\SettingsPanel.cpp:3: src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:11:3: note: candidate: SettingsPanelButton::SettingsPanelButton(char, uint8_t, uint8_t, int) SettingsPanelButton( ^ src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:11:3: note: candidate expects 4 arguments, 5 provided src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate: constexpr SettingsPanelButton::SettingsPanelButton(const SettingsPanelButton&) class SettingsPanelButton : public Component { ^ src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate expects 1 argument, 5 provided src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate: constexpr SettingsPanelButton::SettingsPanelButton(SettingsPanelButton&&) src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate expects 1 argument, 5 provided In file included from src\UserInterface\Apps\SettingsPanel.cpp:3:0: src\UserInterface\Apps\SettingsPanel.h:34:4: error: no matching function for call to 'SettingsPanelButton::SettingsPanelButton(const char [8], int, int, SettingsPanel::SettingsPanel()::<lambda()>, SettingsPanel::SettingsPanel()::<lambda()>)' ); ^ In file included from src\UserInterface\Apps\SettingsPanel.h:6:0, from src\UserInterface\Apps\SettingsPanel.cpp:3: src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:11:3: note: candidate: SettingsPanelButton::SettingsPanelButton(char, uint8_t, uint8_t, int) SettingsPanelButton( ^ src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:11:3: note: candidate expects 4 arguments, 5 provided src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate: constexpr SettingsPanelButton::SettingsPanelButton(const SettingsPanelButton&) class SettingsPanelButton : public Component { ^ src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate expects 1 argument, 5 provided src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate: constexpr SettingsPanelButton::SettingsPanelButton(SettingsPanelButton&&) src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate expects 1 argument, 5 provided In file included from src\UserInterface\Apps\SettingsPanel.cpp:3:0: src\UserInterface\Apps\SettingsPanel.h:35:91: error: no matching function for call to 'SettingsPanelButton::SettingsPanelButton(const char [6], int, int, SettingsPanel::SettingsPanel()::<lambda()>, SettingsPanel::SettingsPanel()::<lambda()>)' this->buttons[3] = new SettingsPanelButton("Sound", 2, 2, []() {return false;}, []() {}); ^ In file included from src\UserInterface\Apps\SettingsPanel.h:6:0, from src\UserInterface\Apps\SettingsPanel.cpp:3: src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:11:3: note: candidate: SettingsPanelButton::SettingsPanelButton(char, uint8_t, uint8_t, int) SettingsPanelButton( ^ src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:11:3: note: candidate expects 4 arguments, 5 provided src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate: constexpr SettingsPanelButton::SettingsPanelButton(const SettingsPanelButton&) class SettingsPanelButton : public Component { ^ src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate expects 1 argument, 5 provided src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate: constexpr SettingsPanelButton::SettingsPanelButton(SettingsPanelButton&&) src/UserInterface/Components/MainPanel/SubComponents/SettingsPanelButton.h:7:7: note: candidate expects 1 argument, 5 provided In file included from src\UserInterface\Components\MainPanel\SubComponents\SettingsPanelButton.cpp:3:0: src\UserInterface\Components\MainPanel\SubComponents\SettingsPanelButton.h:15:9: error: 'std::function' has not been declared std::function<bool(void)> isActiveFunc, ^ src\UserInterface\Components\MainPanel\SubComponents\SettingsPanelButton.h:15:17: error: expected ',' or '...' before '<' token std::function<bool(void)> isActiveFunc, ^ src\UserInterface\Components\MainPanel\SubComponents\SettingsPanelButton.h:31:8: error: 'function' in namespace 'std' does not name a template type std::function<bool()> isActiveFunc; ^ src\UserInterface\Components\MainPanel\SubComponents\SettingsPanelButton.h:32:8: error: 'function' in namespace 'std' does not name a template type std::function<void()> handleTouchFunc; ^ In file included from src/UserInterface/Screens/MainScreen.h:8:0, from src\UserInterface\Apps\AboutPanel.cpp:8: src/UserInterface/Apps/SettingsPanel.h: In constructor 'SettingsPanel::SettingsPanel()': src/UserInt

Thanks :)

spaceAngel commented 1 year ago

ok, I think that is caused by bad compiler settings. Few minutes ago, I commited new platformio.ini with explicit compiler settings.

Please, try it again with new version, currently I can't reproduce this error, cause I haven't pure new installation of VCS.

spaceAngel commented 1 year ago

closing this issue, because it was caused by bad installation/settings of VCS and related C/C++ tools.