Re: Installing MS Win32 SDK.

  • From: "jaffar" <jaffar@xxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Thu, 15 Nov 2007 10:29:49 +0800

Hi Graham.  From experience, i find the setenv.bat doesn't really work.  I 
would suggest a combination of 2 approaches that you can try, then let us know 
if they work.
1.  Set your environment path by hand.
Go to your desktop and choose your my computer icon.  Press the context menu 
key and arrow up once to bring out your properties menu.  When the enter key is 
pressed, you will land on the tab control tree which will enable you to 
navigate to the different pages of the properties menu.  Arrow right until you 
hear advanced.  Tab until you hear environment variables button and press 
enter.  The first option you'll come across is the user environment which will 
not be of interest to you in this case.  Tab until you hear system environment. 
 It is a list of environment variables available to you.  Arrow down until you 
hear path.  Now, tab until you hear edit-I button.  Upon pressing the enter or 
space bar, you'll be presented with an edit box which lists all the programs 
which can successfully run only if an environment path was set up for them.  
Press ctrl+right arrow or ctrl+pagedown which will mark at the end of the 
semi-colon separated list.  Put a semi-colon mark at the end of the last 
available environment variable if it is not present, then type in, for example, 
"C:\Program Files\Microsoft SDK r2\bin" without the quotes and semicolon at the 
end.  I would recommend that you really pay attention to the whereabouts of 
your sdk's bin subdirectory by physically browsing for it yourself.  When your 
are sure that this has been done correctly, press ok, then ok and ok again to 
close the properties menu.  Your environment path is now set.
2.  I am assuming you are using the visuall c++ 2005 express ide in this case, 
though the procedure involved hear applies to any version of the visual studio 
2005 ide.
open up your vc++ express ide.  At the start page, choose tools/options.  You 
will be first presented with the general tab.  Arrow down until you come to the 
projects and solutions tree.  Arrow right to open it.  Arrow down until you 
hear VC++ directories.  Tab to a list which says Show Directories For.  The 
first item on that list is executable files.  Check to see if your SDK's bin 
directory is in the list by tabbing until you get to the list which will 
present you with a list of executables or bin subdirs necessary for running and 
building your programs.  If it is not there, Tab to the new line entry, press 
the space bar and repeat the typing of the sdk bin directory path that you did 
when setting up your environment path.  Now, tab back to the VC++ Files list, 
arrrow down to Include files, then tab to New Line.  Press your space bar and 
type in something like "C:\Program Files\Microsoft SDK r2\Include".  Now tab 
back to the VC++ files list and do the same with the Library and Source 
subdirectories of your sdk directory tree, thus setting their paths internally 
to the VC++ ide.  Once you have done that, check to see if you have 
successfully set the SDK's path.  Go to the command prompt.  CD to where your 
setenv.bat is located.  You'll hear the usual microsoft message.  Type in 
cl.exe -v.  If you have set everything correctly, the version of your c++ 
compiler should be announced.  You are now ready to go.  Hope this tutorial 
will help other new c++ programmers as well.  Cheers!
  ----- Original Message ----- 
  From: Graham Hardy 
  To: programmingblind@xxxxxxxxxxxxx 
  Sent: Thursday, November 15, 2007 9:22 AM
  Subject: Installing MS Win32 SDK.


  Hi all - For some time now I've been trying to get the Microsoft SDK to 
install correctly. Everything seems to be there - all the include files, 
libraries, and NMAKE include files - and, to the best of my knowledge, all of 
the environment variables are set correctly (using the supplied setenv.cmd). 
However, any time I try to compile something, even one of its 'samples', it 
stops with an error telling me that certain files can't be found.

  For example, entering NMAKE in the directory \Samples\Begin\Simple produces 
the following output.--

  C:\Program Files\Microsoft Platform SDK for Windows Server 2003 
R2\Samples\Begin
  \Simple>nmake
  Microsoft (R) Program Maintenance Utility   Version 7.00.8882
  Copyright (C) Microsoft Corp 1988-2000. All rights reserved.
  cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -D_X86_=1  -DWIN32 -
  D_WIN32 -W3 -D_WINNT -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DWINVER=0x0500
  -D_MT -MTd /WX /Fo"WIN2000_DEBUG\\" /Fd"WIN2000_DEBUG\\" simple.c
  simple.c
  simple.c(12) : fatal error C1083: Cannot open include file: 'stdio.h': No 
such f
  ile or directory
  NMAKE : fatal error U1077: 'cl' : return code '0x2'
  Stop.

  All of these directory trees have me stumped, I'm afraid. I'd love 
suggestions, even if they are things like, Use the .NET SDK instead.

  Many thanks,
  Graham.

Other related posts: