Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting rid of the command prompt window in win32

Tags:

c++

c

cmd

mingw

winapi

I just built a standard win32 applicaion but when I run it, there is a command prompt

how can I get rid of that cmd window?

I am not using an IDE I am just using notepad++ to edit

and mingw to compile through the command prompt

I am doing the g++ command to compile

should I use a different one?

thanks


2 Answers

Try adding -mwindows to your linker flags.

like image 105
Kos Avatar answered Dec 02 '25 07:12

Kos


Make sure you have WinMain as your entry point.

See this basic article in MSDN: http://msdn.microsoft.com/en-us/library/ff381406(VS.85).aspx

This follow up link is also helpful: http://msdn.microsoft.com/en-us/library/ff381409(v=VS.85).aspx

like image 37
bumbobway Avatar answered Dec 02 '25 06:12

bumbobway