Problem Compiling in VS 2005 after installing microsoft platform SDK for Windows Serv

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jun 2009
Posts: 7
Reputation: redserpent7 is an unknown quantity at this point 
Solved Threads: 0
redserpent7 redserpent7 is offline Offline
Newbie Poster

Problem Compiling in VS 2005 after installing microsoft platform SDK for Windows Serv

 
0
  #1
Jun 25th, 2009
Hi

As the title suggests I'm having a problem compiling MFC based applications, this problem started immediately after installing the windows server 2003 platform SDK and now even when I try to compile a new MFC project I get the following errors:

  1. c:\program files\microsoft platform sdk\include\zmouse.h(141) : error C2146: syntax error : missing ';' before identifier 'HwndMSWheel'
  2.  
  3. 1>c:\program files\microsoft platform sdk\include\zmouse.h(141) : error C2433: 'HWND' : 'inline' not permitted on data declarations
  4.  
  5. 1>c:\program files\microsoft platform sdk\include\zmouse.h(141) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  6.  
  7. 1>c:\program files\microsoft platform sdk\include\zmouse.h(142) : error C2065: 'PUINT' : undeclared identifier
  8.  
  9. 1>c:\program files\microsoft platform sdk\include\zmouse.h(142) : error C2146: syntax error : missing ')' before identifier 'puiMsh_MsgMouseWheel'
  10.  
  11. 1>c:\program files\microsoft platform sdk\include\zmouse.h(142) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  12.  
  13. 1>c:\program files\microsoft platform sdk\include\zmouse.h(147) : error C2059: syntax error : ')'
  14.  
  15. 1>c:\program files\microsoft platform sdk\include\zmouse.h(148) : error C2143: syntax error : missing ';' before '{'
  16.  
  17. 1>c:\program files\microsoft platform sdk\include\zmouse.h(148) : error C2447: '{' : missing function header (old-style formal list?)
  18.  
  19. 1>c:\program files\microsoft platform sdk\include\commctrl.h(29) : error C2146: syntax error : missing ';' before identifier 'HRESULT'
  20.  
  21. 1>c:\program files\microsoft platform sdk\include\commctrl.h(29) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  22.  
  23. 1>c:\program files\microsoft platform sdk\include\commctrl.h(29) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  24.  
  25. 1>c:\program files\microsoft platform sdk\include\prsht.h(97) : error C2065: 'CALLBACK' : undeclared identifier
  26.  
  27. 1>c:\program files\microsoft platform sdk\include\prsht.h(97) : error C2065: 'LPFNPSPCALLBACKA' : undeclared identifier
  28.  
  29. 1>c:\program files\microsoft platform sdk\include\prsht.h(97) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  30.  
  31. 1>c:\program files\microsoft platform sdk\include\prsht.h(97) : fatal error C1903: unable to recover from previous error(s); stopping compilation
in some cases I solved the problem by including windows.h and defining WIN32_LEAN_AND_MEAN at the top of stdafx.h. However for large projects that uses static and dynamic linking to other libraries the proposed solution did not work. I'm not really sure why this is happening as I've also tried to reinstall the platform SDK to no avail.

Any help is appreciated.

Thanx
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 46
Reputation: ashishchoure is on a distinguished road 
Solved Threads: 3
ashishchoure's Avatar
ashishchoure ashishchoure is offline Offline
Light Poster

Re: Problem Compiling in VS 2005 after installing microsoft platform SDK for Windows Serv

 
0
  #2
Jun 25th, 2009
try using this preprocessor definition
_WIN32_WINNT,
WIN32,_WINDOWS,
UNICODE,
_UNICODE
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 7
Reputation: redserpent7 is an unknown quantity at this point 
Solved Threads: 0
redserpent7 redserpent7 is offline Offline
Newbie Poster

Re: Problem Compiling in VS 2005 after installing microsoft platform SDK for Windows Serv

 
0
  #3
Jun 25th, 2009
Originally Posted by ashishchoure View Post
try using this preprocessor definition
_WIN32_WINNT,
WIN32,_WINDOWS,
UNICODE,
_UNICODE

Thanks for the suggestion, WIN32 is already defined in the preprocessor definitions, I have tried your suggestions but I kept getting the same errors.

I also forgot to mention that I've tried to change the order of the C++ include, executable and lib directories.. but I'm still getting the same errors.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 46
Reputation: ashishchoure is on a distinguished road 
Solved Threads: 3
ashishchoure's Avatar
ashishchoure ashishchoure is offline Offline
Light Poster

Re: Problem Compiling in VS 2005 after installing microsoft platform SDK for Windows Serv

 
0
  #4
Jun 25th, 2009
Have u given path for library in project setting like C:\Program Files\Microsoft Platform SDK\lib in VC++ directories option ??
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 46
Reputation: ashishchoure is on a distinguished road 
Solved Threads: 3
ashishchoure's Avatar
ashishchoure ashishchoure is offline Offline
Light Poster

Re: Problem Compiling in VS 2005 after installing microsoft platform SDK for Windows Serv

 
0
  #5
Jun 25th, 2009
make sure u have this setting
Executable Files-
C:\Program Files\Microsoft Platform SDK\bin\winnt
C:\Program Files\Microsoft Platform SDK\bin\

Include Files-
C:\Program Files\Microsoft Platform SDK\include

Library Files-
C:\Program Files\Microsoft Platform SDK\lib

i think prblm sholud not in includes but just check executable and library.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 7
Reputation: redserpent7 is an unknown quantity at this point 
Solved Threads: 0
redserpent7 redserpent7 is offline Offline
Newbie Poster

Re: Problem Compiling in VS 2005 after installing microsoft platform SDK for Windows Serv

 
0
  #6
Jun 29th, 2009
Nothing worked so I uninstalled VS and all related stuff like .netframework, sql serve, etc. Reinstalled everything and now it works fine
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC