www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Win64, SUBSYSTEM:WINDOWS and friends

reply "Michael" <pr m1xa.com> writes:
MS linker by default allocates console window for programm if he 
see a main function as entry point and not allocates if he see a 
WinMain function as entry point.

So, if I don't want ugly console window for gui app, I can 
specify SUBSYTEM:WINDOWS linker flag and change a main to WinMain.
But I want to use ENTRY linker flag and do not modify source code.
With ENTRY flag a executable successfully compiled, but crashes 
at startup.

Any valid D Way workaround?

dmd -release -m64 -L/SUBSYSTEM:WINDOWS fl64.lib fl_test.d
LIBCMT.lib(wincrt0.obj) : error LNK2019: unresolved external 
symbol WinMain
referenced in function __tmainCRTStartup
fl_test.exe : fatal error LNK1120: 1 unresolved externals
--- errorlevel 1120
-- When compiling without modification in source. P.S.: Win 8 64 bit, Dmd 2.061. fl64.lib and fl64.dll - custom library.
Feb 17 2013
next sibling parent "Michael" <pr m1xa.com> writes:
Oh, sorry.

Valid linker flag to do this

Feb 17 2013
prev sibling parent "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Sunday, 17 February 2013 at 09:13:57 UTC, Michael wrote:
 Any valid D Way workaround?
Feb 17 2013