mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Improved instructions for avoiding the black console window when using visual studio.
This commit is contained in:
parent
094c357ae2
commit
f74ccbdabc
@ -217,24 +217,14 @@ int main()
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// If you use main() as your entry point when building a program on MS Windows then
|
// Normally, if you built this application on MS Windows in Visual Studio you
|
||||||
// there will be a black console window associated with your application. If you
|
// would see a black console window pop up when you ran it. The following
|
||||||
// want your application to not have this console window then you need to build
|
// #pragma directives tell Visual Studio to not include a console window along
|
||||||
// using the WinMain() entry point as shown below and also set your compiler to
|
// with your application. However, if you prefer to have the console pop up as
|
||||||
// produce a "Windows" project instead of a "Console" project. In visual studio
|
// well then simply remove these #pragma statements.
|
||||||
// this can be accomplished by going to project->properties->general configuration->
|
#ifdef _MSC_VER
|
||||||
// Linker->System->SubSystem and selecting Windows instead of Console.
|
# pragma comment( linker, "/entry:mainCRTStartup" )
|
||||||
//
|
# pragma comment( linker, "/SUBSYSTEM:WINDOWS" )
|
||||||
#ifdef WIN32
|
|
||||||
int WINAPI WinMain (
|
|
||||||
HINSTANCE,
|
|
||||||
HINSTANCE,
|
|
||||||
PSTR cmds,
|
|
||||||
int
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return main();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user