PRB: C2146 Error with Sqloledb.h in Platform SDK (255556)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q255556 SYMPTOMS
When you compile an application that uses the Sqloledb.h header file from the Microsoft Platform Software Development Kit (SDK), you receive the following error:
error C2146: syntax error : missing ';' before identifier 'HACCESSOR'
CAUSE
The compiler is unable to find the definition of the ULONG_PTR data type. This data type is defined in the Basetsd.h header file that is included with the Platform SDK but is not defined in the version of the Basetsd.h file that is installed with Microsoft Visual C++.
RESOLUTION
In the Visual C++ settings, the Include directory for the Platform SDK must be above the Include directory for Visual C++ in the search list.
From the Tools menu, click Options and click the Directories tab. In the Show Directories for combo box, click Include files. Make sure that the Platform SDK\Include directory is at the top of the list; this forces the compiler to use the Basetsd.h file from the Platform SDK.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 11/18/2003 |
---|
Keywords: | kbDatabase kbMDACNoSweep kbprb KB255556 |
---|
|