Problem adding a new virtual function to Touchgfx stopsSTMCubeIDE compiler if I try to include definition in relevant screen hpp file.
Everything looks ok and seems the same as all examples however trying to declare any new virtual functions gives me an error so I guess I'm doing something wrong. See code extracts below :-
Code extract from Screen1ViewBase :-
class Screen1ViewBase : public touchgfx::View<Screen1Presenter>
{
public:
Screen1ViewBase();
virtual ~Screen1ViewBase() {}
virtual void setupScreen();
/*
* Virtual Action Handlers
*/
virtual void flexMainMenuClicked()
{
// Override and implement this function in Screen1
}
virtual void ackNotification()
{
// Override and implement this function in Screen1
}
Trying to add the definition for virtual void ackNotification(); in Screen1View.hpp causes a compile error
Code extract from Screen1View.hpp
class Screen1View : public Screen1ViewBase
{
public:
Screen1View();
virtual ~Screen1View() {}
virtual void setupScreen();
virtual void tearDownScreen();
//virtual void flexMainMenuClicked();
virtual void ackNotification();
Compiler error generated :-
TouchGFX/gui/src/screen1_screen/Screen1View.o:(.rodata._ZTV11Screen1View+0x38): undefined reference to `Screen1View::ackNotification()'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:111: STM32_Stage1_V1.elf] Error 1
Any thoughts appreciated
