Microsoft KB Archive/260567

= BUG: LNK2019 When Building For Pocket PC Emulation =

Article ID: 260567

Article Last Modified on 8/19/2005

-

APPLIES TO


 * Microsoft Office Keyboard

-



This article was previously published under Q260567



SYMPTOMS
When building an application for Pocket PC emulation that uses the Windows CE operating system functions, errors similar to the following may be encountered:

.obj : error LNK2019: unresolved external symbol _CeDeleteDatabase referenced in function



CAUSE
These operating system functions use the _stdcall calling convention, but the compiler is declaring them as _cdecl. This problem occurs with the Windows CE Platform SDK for Pocket PC because the functions are incorrectly declared in the Windbase.h file without a linkage type.



RESOLUTION
Use one of the following workarounds:  Add the /Gz compiler switch to the configuration's project settings when building for Pocket PC emulation. -or-

  If the first workaround prevents other functions/libraries from linking in your project, then modify the Windows CE database function declarations in the Windbase.h file. For example, for the error in the &quot;Symptoms&quot; section, change the following declaration BOOL CeDeleteDatabase (CEOID oid); to read: BOOL WINAPI CeDeleteDatabase (CEOID oid); 



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
This bug affects the following function classes:
 * Windows CE Database
 * GDI

Keywords: kbbug kbpending KB260567

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.