Use EVC to compile the wince console applicationProgram
Favorites
Use Appwizard of EVC to generate an empty project
Join TestCodeAs follows:
# Include <windows. h>
Int winapi
_ Tmain (INT argc, char ** argv)
{
Wprintf (L "Hello, WinCE console. \ r \ n ");
Return 0;
}
An error occurred while compiling this EVC project.
Linking...
Corelibc. Lib (pegwmain. OBJ): Error lnk2019: unresolved external symbol _ winmain referenced in function _ winmaincrtstartup
Emulatordbg/console.exe: Fatal error lnk1120: 1 unresolved externals
Error executing link.exe.
Lele.exe-2 error (s), 0 warning (s)
The cause of the error is that the entry is incorrect. The winmaincrtstartup must be mainwcrtstartup on the Unicode system of Ce.
In Project Settings, change link> output> entry-point symbol to mainwcrtstartup.
Rebuild, OK.
D: \ wince500 \ public \ common \ cesysgen \ makefile
######################################## ######################################## ###
#
# Step-4: add your module to exactly one of the following rules, choosing your
# DLL or EXE entry point. Note: Do not create new rules
#
# Dllentry/dllmain -- CILS entry supplied by module. does not call C ++ static ctors/dtors
# Dllmaincrtstartup-callc ++ static ctors & dtors. Then callmodule's dllmain
# Winmain -- callmodule's standard EXE entry point. does not call C ++ static ctors/dtors
# Winmaincrtstartup -- callc ++ static ctors, then callmodule's winmain
# Mainwcrtstartup -- For console apps whose entry is wmain (INT argc, wchar ** argv). Also callc ++ ctors/dtors
# Mainacrtstartup -- For console apps whose entry is main (INT argc, char ** argv). Also callc ++ ctors/dtors
#
######################################## ######################################## #
For more infomation
The console in your pocket
Author of Rainer urian-pocketconsole
Http://www.symbolictools.de/public/pocketconsole/developers/articles/console_internals.htm
Msdn
Http://msdn.microsoft.com/library/default.asp? Url =/library/en-US/wcepbguide5/html/wce50grfENTRYEntry-PointSymbol.asp
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/ganrong/archive/2005/07/26/435046.aspx