I had this problem with third party sample code, it was linking with the option "-mwindows" in CMakeLists.txt. that's why there was no console output.