TouchGFX Tutorial 3 Problems
- October 24, 2019
- 2 replies
- 1159 views
Good morning
I'm a newbie in TouchGFX and C++.
I'm developing the TouchGFX tutorial 3 and I'm in the step 2.
When I run simulator, the Designer output return some errors.
In file included from gui/src/model/Model.cpp:1:0:
gui/include/gui/model/Model.hpp:16:19: error: 'int16_t' has not been declared
void saveHour(int16_t saveHour)
^~~~~~~
gui/include/gui/model/Model.hpp:21:21: error: 'int16_t' has not been declared
void saveMinute(int16_t saveMinute)
^~~~~~~
gui/include/gui/model/Model.hpp:26:5: error: 'int16_t' does not name a type
int16_t getHour()
^~~~~~~
gui/include/gui/model/Model.hpp:31:5: error: 'int16_t' does not name a type
int16_t getMinute()
^~~~~~~
gui/include/gui/model/Model.hpp:40:2: error: 'int16_t' does not name a type
int16_t hour;
^~~~~~~
gui/include/gui/model/Model.hpp:41:5: error: 'int16_t' does not name a type
int16_t minute;
^~~~~~~
gui/include/gui/model/Model.hpp: In member function 'void Model::saveHour(int)':
gui/include/gui/model/Model.hpp:18:9: error: 'hour' was not declared in this scope
hour = saveHour;
^~~~
gui/include/gui/model/Model.hpp: In member function 'void Model::saveMinute(int)':
gui/include/gui/model/Model.hpp:23:9: error: 'minute' was not declared in this scope
minute = saveMinute;
^~~~~~
gui/src/model/Model.cpp: In constructor 'Model::Model()':
gui/src/model/Model.cpp:4:36: error: class 'Model' does not have any field named 'hour'
Model::Model() : modelListener(0), hour(0), minute(0)
^~~~
gui/src/model/Model.cpp:4:45: error: class 'Model' does not have any field named 'minute'
Model::Model() : modelListener(0), hour(0), minute(0)
I literally copied the code from tutorial into Model.hpp and Model.cpp.
I attach the 2 files.
Anyone has got an idea what happens?
Thanks
AAlberto