Jump to content

[SOLVED] how to get rid of console output


photo

Recommended Posts

I mean turn off the automatic unigine output, because i want see my output.

but that all right, i can output my debug info by ::outputDebugString. thx.

Link to comment
  • 3 years later...
On 8/30/2016 at 12:53 PM, silent said:

Hi Zhang,

 

You can just add following commands to linker:


/subsystem:windows /entry:mainCRTStartup 

Please, check this stackoverflow thread: http://stackoverflow.com/a/6882500/2786370

 

Thanks!

hi silent,

the method didn't work, and got LNK2019 error.  ( unresolved external symbol main in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) ...)

environment: vs2015, unigine sim 2.7.2

any suggestions? thx.

 

 

 

Link to comment

Hello, morbid:
Recently, I tried to find a way to hide the  console window of Windows application . Because it reveals too much information. I found a related topic in the forum, therefore I try to see how it works.
I created a new project and added "/subsystem:windows /entry:mainCRTStartup" into linker, after that I got an error message

" got LNK2019 error. ( unresolved external symbol main in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) ...) ".

Finally I got a solution for windows application.  Add #include <windows.h> to test.cpp ("test" is my project name) and add

HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);

The console window shows temporarily. It doesn't work perfectly, but the best I can do.

 

 

Snipaste_2019-12-09_09-21-32.jpg

Snipaste_2019-12-09_09-21-07.jpg

Snipaste_2019-12-09_10-18-13.jpg

Link to comment
  • silent changed the title to [SOLVED] how to get rid of console output
×
×
  • Create New...