2019-04-18 06:27 AM
Detailed log
Converting images
Compiling gui/src/model/Model.cpp
In file included from gui/src/model/Model.cpp:1:0:
gui/include/gui/model/Model.hpp: In constructor 'Model::Model()':
gui/include/gui/model/Model.hpp:65:20: error: 'Model::modelListener' will be initialized after [-Werror=reorder]
ModelListener* modelListener;
^~~~~~~~~~~~~
gui/include/gui/model/Model.hpp:60:10: error: 'int16_t Model::hour' [-Werror=reorder]
int16_t hour;
^~~~
gui/src/model/Model.cpp:8:1: error: when initialized here [-Werror=reorder]
Model::Model() : modelListener(0), hour(0)//, minute(0)
^~~~~
cc1plus.exe: all warnings being treated as errors
simulator/gcc/Makefile:220: recipe for target 'build/MINGW32_NT-6.2/gui/src/model/Model.o' failed
make[2]: *** [build/MINGW32_NT-6.2/gui/src/model/Model.o] Error 1
simulator/gcc/Makefile:182: recipe for target 'generate_assets' failed
make[1]: *** [generate_assets] Error 2
simulator/gcc/Makefile:40: recipe for target 'all' failed
make: *** [all] Error 2
Model.ccp
#include <gui/model/Model.hpp>
#include <gui/model/ModelListener.hpp>
void Model::tick()
{
}
Model::Model() : modelListener(0), hour(0), minute(0)
{
}
Solved! Go to Solution.
2019-04-23 01:27 AM
Hi @0910655,
Looks like a simple case of gcc initialization order. Check that you've declared the variables in the same order you're initializing them in (in your Model constructor)
Best regards,
Martin
2019-04-23 01:27 AM
Hi @0910655,
Looks like a simple case of gcc initialization order. Check that you've declared the variables in the same order you're initializing them in (in your Model constructor)
Best regards,
Martin
2019-05-05 11:53 PM
Thank you very much. This is the solution.
2019-05-07 12:08 AM
No problem! :) Glad it worked out for you.