Use EVC to compile applications in the wince Console mode

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.