# Platform sdk

This topic is 4050 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Running Visual Studio 2005 Pro. I just installed the latest platform sdk (Windows SDK Vista Feb 2007 Update). I added the include and lib directories to the directories list under options and put them at the top of the list. When I compile my project, I get a ton of errors, mostly out of the wtypes.h file Below is just a sample 1>c:\program files\microsoft sdks\windows\v6.0\include\wtypes.h(343) : error C2146: syntax error : missing ';' before identifier 'OLECHAR' 1>c:\program files\microsoft sdks\windows\v6.0\include\wtypes.h(343) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files\microsoft sdks\windows\v6.0\include\wtypes.h(345) : error C2143: syntax error : missing ';' before '*' 1>c:\program files\microsoft sdks\windows\v6.0\include\wtypes.h(345) : error C2373: 'OLECHAR' : redefinition; different type modifiers 1> c:\program files\microsoft sdks\windows\v6.0\include\wtypes.h(341) : see declaration of 'OLECHAR' If I move the SDK include below the included platform sdk with Visual Studio, it goes back to compiling just fine (which means what ever is causing the problem is in the new sdk files and not in the old ones). Anyone else had this trouble or any suggestions?

##### Share on other sites
I still use the last Windows Server 2003 RC2 SDK.

##### Share on other sites
What do your includes look like?

##### Share on other sites
Eh? I don't understand.

Open Visual Studio...

In Tools/Options/VC++ Project Directories...

c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\include

Then go to the Lib option in the drop down and add:

c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\lib

Make sure that these are placed at the top of their respective categories, or else the header files will be pulled from the ancient platform sdk that was installed with visual studio.

##### Share on other sites
Quote:
 Original post by pTymNEh? I don't understand.Open Visual Studio...In Tools/Options/VC++ Project Directories...Select Include from the drop down menu. Add something like:c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\includeThen go to the Lib option in the drop down and add:c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\libMake sure that these are placed at the top of their respective categories, or else the header files will be pulled from the ancient platform sdk that was installed with visual studio.

I think you missed the point. When these files are at the top, I start getting compiler errors.

As far as files I include, its a rather big project, but the main window ones would be

<tchar.h>
<string>
<iostream>
<sstream>
<tchar.h>
<cwchar>
<vector>
<deque>
<stack>
<queue>
<map>
<list>
<algorithm>
<windows.h>
<msdasc.h>
<oledb.h>
<OledbErr.h>
<msdaguid.h>
<eh.h>
<exception>
<iterator>
<memory.h>
<cassert>
<winsock2.h>
<semaphore.h>
<climits>
<windows.h>
<process.h>
<cerrno>
<cstdlib>
<memory>
<stdexcept>

Also have various includes from loki and boost libraries

##### Share on other sites
Are you sure you need these headers?

<msdasc.h><oledb.h><OledbErr.h><msdaguid.h>

Also, for style, clean up your includes. You have some headers included more than once.

##### Share on other sites
Yes I do. Part of the project related to database access, and those are needed for OleDB.

Those results were a modified find in files of every "#include <". There are going to be multiple references do to the nature of many of the classes. The project is also cross platform in nature, so there are infact more includes like pthreads.h which don't compile well in windows.

As I said, with the platform sdk included with Visual Studio 2005 Pro, no problems at all, its just the new platform sdk that seems to be causing a problem.

1. 1
2. 2
JoeJ
17
3. 3
4. 4
frob
11
5. 5

• 13
• 16
• 13
• 20
• 13
• ### Forum Statistics

• Total Topics
632181
• Total Posts
3004625

×