I don't understand the question being asked, and I guess nobody else either, which is why you haven't received any replies. For example, what does "anything does not works on 'cmd'" mean.
Anyway, if you want to run a GUI application (in the Windows subsystem) and want to write to the console from which you started that application, or if you want to build one executable that can run in both the Windows and Console subsystems, you're out of luck - it's either one or the other. There are various ways to work around this limitation, but without known what you want to do, it's hard to tell which ones are suitable for your situation.