[CMake] add_executable and WIN32 option

Alin M Elena alin.elena at qub.ac.uk
Thu Apr 10 05:47:22 EDT 2008


Hi,

Thanks Christian for the answer.
I think that I am a little confused about what WIN32 option does in fact.

Is WIN32 supposed to transform main() in a WinMain() entry point (transform
a /subsystem:console -> /subsystem:windows)?
Or 
WIN32 tells compiler: do not downgrade a WinMain to a main()?



Alin

____________________________________________________________________
"...if the universities will not study useless subjects, who will?"
                           G. F. Fitzgerald, Nature, 45/46, 392 (1892)
______________________________________________________________________
Mr. Alin M. ELENA
Atomistic Simulation Centre
School of Mathematics and Physics
Queen's University Belfast
Office: +44 (0)28 9097 1428
Fax: +44 (0)28 9097 5359
http://titus.phy.qub.ac.uk/group/Alin/
alin.elena at yahoo.co.uk
alin.elena at qub.ac.uk
______________________________________________________________________

-----Original Message-----
From: Christian Ehrlicher [mailto:Ch.Ehrlicher at gmx.de] 
Sent: 10 April 2008 10:20
To: cmake at cmake.org
Cc: alin.elena at qub.ac.uk
Subject: Re: [CMake] add_executable and WIN32 option

> Von: "Alin M Elena"
>                 Hi
> 
>  
> 
> I try to use WIN32 option with cmake 2.6 rc6
> 
>  
> 
<snip> 
> MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol
> _WinMain at 16 referenced in function ___tmainCRTStartu
> 
> p
> 
Read the wiki faq:
http://www.cmake.org/Wiki/CMake_FAQ#Why_am_I_getting_a_linker_error_to__main
CRTStartup_under_WIN32.3F


HTH
Christian
-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser



More information about the CMake mailing list