From: torhu <tor...@gm...> - 2011-01-18 12:29:17
|
On 18.01.2011 11:08, Xpol Wan wrote: > Finally, I found that the follow code in the alwin.h: > > #ifndef ALLEGRO_NO_MAGIC_MAIN >> #if defined _MSC_VER&& !defined ALLEGRO_LIB_BUILD >> #pragma comment(linker,"/ENTRY:mainCRTStartup") >> #endif >> #endif >> > > Accroding to the code, I defined ALLEGRO_NO_MAGIC_MAIN, and every thing is > OK now. > I suggest that the guard condition should be change to: > > *#if !defined(ALLEGRO_NO_MAGIC_MAIN)&& !defined(_WINDLL)* >> #if defined _MSC_VER&& !defined ALLEGRO_LIB_BUILD >> #pragma comment(linker,"/ENTRY:mainCRTStartup") >> #endif >> #endif >> There are other cases where this matters too, like when you want to use WinMain or wmain. I think it would help if ALLEGRO_NO_MAGIC_MAIN was mentioned in the docs. |