Platform sdk

Started by
5 comments, last by Rattrap 16 years, 9 months ago
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?

"I can't believe I'm defending logic to a turing machine." - Kent Woolworth [Other Space]

Advertisement
I still use the last Windows Server 2003 RC2 SDK.

What do your includes look like?
Eh? 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\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.

Quote:Original post by pTymN
Eh? 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\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.


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

"I can't believe I'm defending logic to a turing machine." - Kent Woolworth [Other Space]

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.
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.

"I can't believe I'm defending logic to a turing machine." - Kent Woolworth [Other Space]

This topic is closed to new replies.

Advertisement