I want to use console.log in my application to print output in console window, but the compiler reports this error
Description Resource Path Location Type
'console' was not declared in this scope CalcolatorQML.cpp /CalcolatorQML/src line 27 C/C++ Problem
Now how can I solve it?
Thanks
There is not a console windown on BB10. To log to the IDE console terminal you can use stdout/stderr (cout/cerr) but these should be removed prior to production. Output to stdout/stderr in production mode (with no debugger attached) ends up being stored on the device ‘disk’ taking up space and causing unneed wear on the flash devices.
For production error loggin you should use the slog2 facility either directly or by using the QDebug object.