Skip to main content
GunkutA
Associate III
January 23, 2020
Question

Cannot run target or simulator

  • January 23, 2020
  • 6 replies
  • 1049 views

Hello, I cannot run target nor run the simulator eventhough I can debug the solution file from VisualStudio. There are no errors in the VisualStudio. So what might be the reason behind that? Detailed Log is showing tons of errors and failures.

Here is the TouchGFX Designer Output: (It is too long so I put last lines of it.)

gui/include/gui/model/Model.hpp:15:19: error: '_int16' has not been declared
 void saveHour(_int16 saveHour)
 ^~~~~~
 gui/include/gui/model/Model.hpp:20:21: error: '_int16' has not been declared
 void SaveMinute(_int16 saveMinute)
 ^~~~~~
 gui/include/gui/model/Model.hpp:24:5: error: '_int16' does not name a type
 _int16 getHour()
 ^~~~~~
 gui/include/gui/model/Model.hpp:29:5: error: '_int16' does not name a type
 _int16 getMinute()
 ^~~~~~
 gui/include/gui/model/Model.hpp:37:5: error: '_int16' does not name a type
 _int16 hour;
 ^~~~~~
 gui/include/gui/model/Model.hpp:38:5: error: '_int16' does not name a type
 _int16 minute;
 ^~~~~~
 gui/include/gui/model/Model.hpp: In member function 'void Model::saveHour(int)':
 gui/include/gui/model/Model.hpp:17: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:22:9: error: 'minute' was not declared in this scope
 minute = saveMinute;
 ^~~~~~
 In file included from generated/gui_generated/include/gui_generated/screenclock1_screen/screenClock1ViewBase.hpp:9:0,
 from gui/include/gui/screenclock1_screen/screenClock1View.hpp:4,
 from gui/src/screenclock1_screen/screenClock1Presenter.cpp:1:
 gui/include/gui/screenclock1_screen/screenClock1Presenter.hpp: In member function 'int16_t screenClock1Presenter::getHour()':
 gui/include/gui/screenclock1_screen/screenClock1Presenter.hpp:40:23: error: 'class Model' has no member named 'getHour'; did you mean 'saveHour'?
 return model->getHour();
 ^~~~~~~
 gui/include/gui/screenclock1_screen/screenClock1Presenter.hpp: In member function 'int16_t screenClock1Presenter::getMinute()':
 gui/include/gui/screenclock1_screen/screenClock1Presenter.hpp:44:23: error: 'class Model' has no member named 'getMinute'; did you mean 'SaveMinute'?
 return model->getMinute();
 ^~~~~~~~~
 make[2]: *** [build/MINGW32_NT-6.2/gui/src/screenclock1_screen/screenClock1View.o] Error 1
 simulator/gcc/Makefile:214: recipe for target 'build/MINGW32_NT-6.2/gui/src/screenclock1_screen/screenClock1View.o' failed
 make[2]: *** [build/MINGW32_NT-6.2/gui/src/screenclock1_screen/screenClock1Presenter.o] Error 1
 simulator/gcc/Makefile:214: recipe for target 'build/MINGW32_NT-6.2/gui/src/screenclock1_screen/screenClock1Presenter.o' failed
 simulator/gcc/Makefile:176: recipe for target 'generate_assets' failed
 make[1]: *** [generate_assets] Error 2
 simulator/gcc/Makefile:37: recipe for target 'all' failed
 make: *** [all] Error 2
 Failed
 Failed

 The thing is the places where log says "error" or "fail" there is no problem in the VS project.

This topic has been closed for replies.

6 replies

Martin KJELDSEN
Principal III
January 23, 2020

You have to consider that we use gcc to compile for the simulator through TouchGFX Designer. If you write specifically for gcc, some code won't compile in a Microsoft compiler, and vice versa. _int16 is microsoft specific.

GunkutA
GunkutAAuthor
Associate III
January 23, 2020

So how can I fix that? If I fix VS then Touch GFX will not be able to compile if the opposite then VS will not compile.

Martin KJELDSEN
Principal III
January 23, 2020

It's not quite that complex. Use something that both compilers understand, like int16_t instead of __int16.

GunkutA
GunkutAAuthor
Associate III
January 23, 2020

Unfortunately VS 2019 does not recognize int16_t

GunkutA
GunkutAAuthor
Associate III
January 23, 2020

Edit: I changed them to int. Then visual studio accepted it. Thanks for the help Martin.

Martin KJELDSEN
Principal III
January 23, 2020

Visual studio supports fixed-width integral types (in stdint.h), like int16_t. Both gcc and msvs understand these.