locked
windows.h not found... RRS feed

  • Question

  • WOW, I can't believe this information isn't easier to find.  I downloaded and installed Visual C++ 2005 Express, and then downloaded and installed the Platform SDK SP2.  NOTHING WORKS!  The Directories are not found and there is no apparent way to set them.  Apparently users have found a hack to make it work, but this is crazy.  It seems like the first Microsoft person to install this would notice that it doesn't work and would raise the flag to the appropriate people so they can take the steps to fix it for their users.  Or at least document it on the very first page where it is downloaded, or the very first page of the documentation.  A user shouldn't have to hit forums to find out how to make a product work.
    Sorry, I'm not usually one to complain, and I am a big fan of Microsoft.  I guess I'm just hoping they will fix this or let us know what happened. 
    I don't understand why I have to copy those directories and why I can't just correct whatever file is pointing to them.  I went to those weird config files and changed them to point to my directories, but it still cannot find windows.h.  Any ideas?

    John
    Thursday, May 5, 2005 2:30 PM

Answers

  • The easiest procedure to use the PSDK with VC2005 Express is:

    1. Create a directory "PlatformSDK" under "%ProgramFiles%\Microsoft Visual Studio 8\VC"
    2. Copy the "bin", "include" and "lib" directory from the PSDK-installation into this directory.

    Then you do not need to change any config file.

    Newest PSDK-ISO is available at:
    http://www.microsoft.com/downloads/details.aspx?FamilyId=D8EECD75-1FC4-49E5-BC66-9DA2B03D9B92 
    -- Greetings Jochen My blog about Win32 and .NET http://blog.kalmbachnet.de/
    Thursday, May 5, 2005 3:33 PM
  • With the Visual Studio 2008 Express versions you can build Win32 applications right out of the box.  You no longer have to manually integrate the Windows SDK content with VC++ Express.  Windows.h is installed by default to C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\windows.h.

     

    The Visual Studio 2008 editions are seamlessly integrated with the Windows SDK.  VS2008 editions include the same Vista RTM headers and libraries that shipped in the Microsoft Windows  Software Development Kit Update for Windows Vista released in March, 2007.

     

    See post below for detailed instructions on how to work with Visual Studio 2008 and the Windows SDK.

     

          K a r i n   M e i e r

    Windows SDK | Samples & Community PM

    http://blogs.msdn.com/KarinM

     

     

    Tuesday, February 19, 2008 6:19 AM
  • Using Visual C++ Express with the Windows SDK (short version)

     

     This article describes what you need to do to build Win32 applications using Visual C++ Express and the Windows SDK for Windows Server 2008 and .NET Framework 3.5.  A more detailed explanation including screenshots can be found here.

     

    With the Visual Studio 2008 Express versions you can build Win32 applications right out of the box.  You no longer have to manually integrate the Windows SDK content with VC++ Express.

     

    The Visual Studio 2008 editions are seamlessly integrated with the Windows SDK.  VS2008 editions include the same Vista RTM headers and libraries that shipped in the Microsoft Windows  Software Development Kit Update for Windows Vista released in March, 2007. The SDK tools included with VS2008 editions are more recent than those that ship in the Vista Update SDK and the Windows Server 2003 Platform SDK.

     

    If you install another SDK, such as the Windows SDK for Windows Server 2008 and .NET Framework 3.5 after you install VS, you are ready to develop with the headers, libraries and tools in the SDK for Windows Server 2008.  Read on if you installed the SDK before installing Visual Studio.  (It’s easy to switch back if you want.) 

     

    Here’s how:

    Step 1: Install Microsoft Visual C++ 2008 Express.

    Step 2: Install the Windows SDK for Windows Server 2008 and .NET Framework 3.5.

    You’re done.  After installing the Server 2008 SDK, the registry key is set to point to the new Server 2008 SDK (v6.1) content.  If you installed the Windows Server 2008 SDK before you install Visual Studio, you will need to use the SDK Configuration Tool to set the directories.  If you want to switch back to the default (Vista v6.0A) headers and libraries that were installed with VS 2008, you should use the new SDK Configuration Tool to select the v6.0A SDK content.

    Step 3: Use the SDK Configuration Tool to update the Visual C++ directories

    The Windows SDK for Windows Server 2008 includes a new SDK Configuration Tool that sets the Visual Studio include, library and tools directories for you.  This tool allows you to switch quickly between the headers, libraries and tools in the installed Windows SDK(s) and those that are embedded in Visual Studio.  If you install the Windows Server 2008 SDK before you install Visual Studio, you will need to use the SDK Configuration Tool to set the directories manually.

     

     The SDK Configuration Tool has a GUI interface but it works only on the Visual Studio Retail (non-Express) SKUs.  (This is scheduled be fixed in the next release.) You will use the SDK Configuration tool at the command line with VC++ Express.

     

    1.       Launch the Windows SDK Command Window (Start, All Programs, Microsoft Windows SDK v6.1, Command Window)

    2.       CD to \Program Files\Microsoft\Windows\v6.1\Setup>

    3.       Type:  WindowsSdkVer.exe -version:v6.1

     

    This command will set the Windows SDK for Windows Server 2008 (v 6.1) as the “current” SDK for Visual Studio to use for headers, libraries and tools.  Use ‘-version:v6.1’ for the Windows Server 2008 SDK content.  Use ‘-version:v6.0A’ for the Visual Studio 2008 content. 

     

    Step 4: Validate that the directories were updated.

    Open the VC++ Express command window and check the PATH to see if the v6.1 directory has been added.

    How to switch directories back to the SDK content that shipped ‘in the box’ with VC++ 2008 Express

    Use the SDK Configuration Tool at the command line to make v6.0A the current version.

     

    Karin Meier

    Windows SDK Program Manager

    This posting is provided “AS IS” with no warranties, and confers no rights.

    send feedback to wsdkfb@microsoft.com

     

     

    Friday, February 22, 2008 6:02 AM
  • For using the PSDK headers with the express SKU, please take a look at http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx

    Hope this is helpful!

    Thanks,
      Ayman Shoukry
      VC++ Team
    Friday, November 4, 2005 10:14 PM
  • The are a couple of things that you need to remember about the Express Edition:

    1) It is a starter product: the "typical" customer we foresee for the Visual C++ Express Edition is a student who is interested in learning C++.

    2) It is a product that you download: therefore even in these days of broadband we needed to keep down the size of the product.

    Combine these two statements and you see why we didn't include the Platform SDK - it was just too big. As Ayman, and many other people, have pointed out you can, if you really want the PSDK, then you can download it separately. While there were issues with the integration of the PSDK with the Beta-2 release of the Visual C++ Express Edition these have been fixed with the final Whidbey release.
    Friday, November 4, 2005 10:40 PM

All replies

  • The easiest procedure to use the PSDK with VC2005 Express is:

    1. Create a directory "PlatformSDK" under "%ProgramFiles%\Microsoft Visual Studio 8\VC"
    2. Copy the "bin", "include" and "lib" directory from the PSDK-installation into this directory.

    Then you do not need to change any config file.

    Newest PSDK-ISO is available at:
    http://www.microsoft.com/downloads/details.aspx?FamilyId=D8EECD75-1FC4-49E5-BC66-9DA2B03D9B92 
    -- Greetings Jochen My blog about Win32 and .NET http://blog.kalmbachnet.de/
    Thursday, May 5, 2005 3:33 PM
  • I had a problem where I cant find some major dll's and header files on my NEW WINDOWS INSTALL with beta 2. Beta 1 worked fine, but beta 2 could not wind mscorbill.dll nor windows.h
    Wednesday, May 11, 2005 1:28 AM
  • HI,

    I also get problems with windows.h file in Visual C++ Express

    I have done all the fixes in this and the other thread

    Here is my evil error,

    ------ Build started: Project: Brainiac 2, Configuration: Debug Win32 ------

    Compiling...

    Bitmap.cpp

    c:\documents and settings\shaun fraser\desktop\tutorails\c++\visualcpp\chap12\brainiac 2\bitmap.h(11) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    Brainiac.cpp

    c:\documents and settings\shaun fraser\desktop\tutorails\c++\visualcpp\chap12\brainiac 2\brainiac.h(11) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    GameEngine.cpp

    c:\documents and settings\shaun fraser\desktop\tutorails\c++\visualcpp\chap12\brainiac 2\gameengine.h(11) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    Sprite.cpp

    c:\documents and settings\shaun fraser\desktop\tutorails\c++\visualcpp\chap12\brainiac 2\sprite.h(11) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    Generating Code...

    Build log was saved at "file://c:\Documents and Settings\shaun fraser\Desktop\Tutorails\C++\VisualCPP\Chap12\Brainiac 2\Debug\BuildLog.htm"

    Brainiac 2 - 4 error(s), 0 warning(s)

    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Thursday, May 12, 2005 11:12 PM
  • Well, it seems this product got more bugs and missing lib's then what is realy can do.
    Wednesday, July 27, 2005 4:05 PM
  • A decision was made long ago by the team that Visual C++ Express (a free product) cannot be used for native Windows development out of the box.  It can only be used for .NET/CLR development.   

    For native apps, the only choice is to do a separate 500 megabyte download of the Platform SDK, or order the Platform SDK CD from Microsoft.

    Another thing is you cannot do MFC or ATL development,  I suggest you try Microsoft WTL instead, a free download (although I'm not sure if this works on its own without ATL)
    Thursday, August 4, 2005 3:16 AM
  • "A decision was made long ago by the team that Visual C++ Express (a free product) cannot be used for native Windows development out of the box.  It can only be used for .NET/CLR development. "  

    And I made the decision to drop Visual C++ Express upon reading this shocking information
    Friday, September 23, 2005 1:06 AM
  • I am disappointed. A waste of time.

    Friday, November 4, 2005 11:01 AM
  • The bunk stops here...if I'm going to waste my time, I'll waste it on compiling in cygwin.
    Friday, November 4, 2005 10:03 PM
  • For using the PSDK headers with the express SKU, please take a look at http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx

    Hope this is helpful!

    Thanks,
      Ayman Shoukry
      VC++ Team
    Friday, November 4, 2005 10:14 PM
  • The are a couple of things that you need to remember about the Express Edition:

    1) It is a starter product: the "typical" customer we foresee for the Visual C++ Express Edition is a student who is interested in learning C++.

    2) It is a product that you download: therefore even in these days of broadband we needed to keep down the size of the product.

    Combine these two statements and you see why we didn't include the Platform SDK - it was just too big. As Ayman, and many other people, have pointed out you can, if you really want the PSDK, then you can download it separately. While there were issues with the integration of the PSDK with the Beta-2 release of the Visual C++ Express Edition these have been fixed with the final Whidbey release.
    Friday, November 4, 2005 10:40 PM
  • The solution posted by Jochen Kalmbach seems to be easier than the instructions about how to change all the config files.
    Tuesday, November 8, 2005 1:52 AM
  • I guess that's understandable...
    Tuesday, November 8, 2005 1:53 AM
  • visual C++ EE isn't compiling typical students homework.

    Tuesday, November 8, 2005 3:28 AM
  • miznig I'd say that that's more the fault of educators not typically teaching standard-conforming C++, and not taking it upon themselves to use the latest compilers and technologies in the classroom
    Friday, November 11, 2005 4:12 PM
  • "2) It is a product that you download: therefore even in these days of broadband we needed to keep down the size of the product."

    You should have informed the user during install that VS Express edition was limited and offered the option of downloading and setting up the platform SDK as part of the installation.  THen the user has the choice of how much support they need based on what kinds of apps they want to develop.  That is a lot easier than having to figure the problem out by getting all sorts of cryptic error messages and googling around till you find an answer.

    Thanks,
    Carl Youngblood
    Friday, December 2, 2005 6:56 PM
  • cayblood, if you read the page where you downloaded c++ express from then you wouldn't be saying this.
    Under the easy to use section there is

    Build 32-bit native code applications designed for Windows using the Windows Platform SDK

    And that link goes to the PSDK download page. How much more of a hint do you need?
    Friday, December 2, 2005 8:08 PM
  • Firstly my I won't use express edition for my standard work. Also as mentioned before but a user for teaching and stuff I would like to comment this. I want my teacher to push my limits so I can perform better in my work and get better knowledge by taking up diffucult subjects. These subjects and code optimization techniques are hard to do without the right tools. So that's why we use them and in many schools it's done the same.

     

    Well if you don't want to have your best out of your education that's you problem, but i think most of us do. I know it's known that many ppl are using *** versions in school because they can't afford such expensive tools. But maybe they are in need and don't have the money to buy them, will you restrict them from leanring ? I don' agree on that considering microsoft it not a poor company.

    Monday, December 19, 2005 10:13 AM
  • I carefully followed these directions. The compiler still could not find windows.h. Detailed info below. Apparently the problem is that the system is looking for an environment variable $(FrameworkSDKDir) that is not being set by the procedures shown at this web page. My workaround was to add

      c:\program files\Microsoft Platform SDK\bin

    and so on to the bin, include, and lib  settings under

    Tools \ Options \ Projects and Solutions \ VC++ Directories

    There must be an easier way.

    Thanks,

     ==========

    error message reads: File 'windows.h' not found in current source file's directory or in build system paths. ... Build system path: C:\Program Files\Microsoft Visual Studio 8\VC\include;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\include

    Note that in fact there is no directory "PlatformSDK" under the VC directory.

    The actual directory in which windows.h lives is

      C:\Program Files\Microsoft Platform SDK\Include

    After following Microsoft's directions, Tools\Options\Projects and Solutions\VC++ Directories has the following under Win32 / Include files:

    $(VCInstallDir)include

    $(VCInstallDir)PlatformSDK\include

    $(FrameworkSDKDir)include

    So apparently $(FrameworkSDKDir) is not getting set.

     

    Thursday, December 29, 2005 8:28 AM
  • Quick and easy fix - the problem is that the Platform SDK does not set its paths up correctly. It assumes that it is installed in the MSVC folder under PlatformSDK, but the default install for the PSDK is to C:\Program Files\Microsoft Platform SDK.

    Under each of bin, include and lib, correct the Platform SDK entry by browsing for it. That should fix you up and get you running. I hope MS fix up the Platform SDK installer to respect its default configuration in a future release.
    Tuesday, January 10, 2006 7:33 PM
  • Did any of you stumbled over the cruel video, if you do exactly what they say ánd write it will not work the paths are messed up?! Especially the video is extremly poor it took me  hous to get all the steps wrtitten down (not done). The speaker speaks in varying tempos with gruelsome american accent (since i a am german it is breakiing my ears). Someties the urls are spelled but not allways, what happens on the screen is differnt than that what is written in the video. And the thing that made me really susopicious that there was no successfull compile with any example was shown. So it was clear that the exnterprise making the film was a different or that some lazy developer made the film.

    Did you ever try any of the intallation instructions? (If you try the ProccessorId example it will work). But if you do as said for a Win32 example, compile the new File Template for  Win32 Template, it will not work. It did not. My paths were set up in the VC++ Options 100% correctly yet it does not workl. Since i am a complete windows nebwie , i hope that the i really only miss  out a WinMain. Of course reading nad thinking trains my brain but I can have that do it yourself quality with LInux. I came back to the Windows world because there was always a working example but this worse than Linux. Please undesrtand windows before you try  to programm it. This is Linux World i am fleeing off but the virus has definetly infected microsoft. It took me now 6 work days just to get the glimpse of hpe to get a little nearer.

    Some more cruel points  i really hope to be covered by microsoft:

    Why is the most import information for the newbies in this forum : What are the windows subsystems?  

    Ido not get any rollover help  example  What the hack is the difference between Win32 platform and active 32 patform.

    Why if I press "post forum question" am I ending in the main forum page. I want to post a question  if i press the button which is entitled that way.

    Yours sinverly

    Harald Blum

    P.S.: I am really annoyed by the linux habit , think compile and change the kernel for yourself. Why (answer from the linux community : because it is so easy ! (My question back Is  it?)

     

    Tuesday, January 17, 2006 5:30 PM
  • Please log such feedback at http://lab.msdn.microsoft.com/productfeedback/default.aspx so that the owner would look into the issue. Please include specific details with your comments.

    Thanks in advance for taking the time to log the issue!

    Thanks,
    Ayman Shoukry
    VC++ Team
    Tuesday, January 17, 2006 5:54 PM
  • Thank-you Jochen Kalmbach!! :D

    I followed the video (http://download.microsoft.com/download/c/e/8/ce8ef096-250d-4214-869d-9d7b218f3f27/Video1_PSDK.wmv) and tutorial (http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx or http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/) exactly, and then the final step of step 5 (pressing F5) of the tutorial didn't work... It still couldn't find windows.h, even after restarting VS. Very frustrating!

    But after moving the directories, it worked perfectly... They should include that step in the instructions. Or even better, it should've been done automatically during the installation of PSDK... *sigh*

    Friday, March 3, 2006 2:35 PM
  • Where can we get the Whidbey release?
    Saturday, March 4, 2006 9:30 PM
  • IT IS WORKING FOR ME !

    YET THE VIDEO HAS THE SAME BUGS:

    If you do exactly what they say and write it will not work the paths are messed up?! Especially the video is extremly poor it took me  hous to get all the steps wrtitten down. There is no zoom on the Screen.

    The Instruction doese no change to the correct path. So you do not add the correct library types. 

    The speaker speaks in varying tempos with strong american accent (nearly uncomprehensible for a german )

    Someties the urls are spelled but not allways, what happens on the screen is differnt than that what is written in the video.

    Yet the problem stays the same no win32 example, no installation instruction did work. It took me several days of research in comunities to make them work. Mr. Shoukry helped me with the links to the Microsoft instructions. Read Mr. Shoukrys links , and if you want to program windows ensure to have a win32 sample class that compiles.

     

     

     

     

     

    Tuesday, March 14, 2006 12:49 PM
  • Introduce systematic testing, please!

    You release a software to millions free but untested. Or write : Hey it is free but untested.

    Remove or corrrect bugs, remove faulse instruction installations !

    The buggy software and instructions linger unchanged  on the serve since weeks.

     

     

     

     

    Tuesday, March 14, 2006 1:06 PM
  • First of all, I appologize if I say something simple and obvious: I am beginner in Windows programming. After some soul seraching I decided on c++, and visual express c++ seemed a good place to start.

    I installed both SDK and VC++ as described in the link provided in one of the previous posts:

    http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx

    Umps... what shall I say, it was one day work, but something does not work and it is very subtle error. When I generate win32 executable (in win32 mode, other computer does not have .NET), it runs on my labtop but not on another pc. I am testing this since I collaborate with experimental group and I want to see whether I can just put my programs on their computer to use.

    For example, if I compile within visual studio c++ express (using menues such as build project), executable does not run on another machine (that does not have .NET installed). On the other hand, if I compile it on the command prompt, the one offered within visual studio, it strangely, works. The code is bellow (really simple test program):

    #include <stdio.h>

    void main()
    {
            printf ("Win32, it's happenin'!");
    }

    I think that visual studio c++ express is good program and would like to use it. But it is somewhat disturbing that the outcome of my compilation/buildup depends on whether I use command prompt or not.

    I would be very, very grateful if someone could help me with this. Now after whole day spent on this I think I am giving up for today.

    Zoran

    p.s. Is there a way to query from command line (or some other way) whether my executable is prepared for .NET or no .NET platform? (At the moment since I do not have good understanding of environment I am testing this by copying executable to antother PC that does not have .NET installed and try to run it there, really time consuming practise). 

    Thursday, March 16, 2006 7:00 PM
  •  zorank wrote:

    First of all, I appologize if I say something simple and obvious: I am beginner in Windows programming. After some soul seraching I decided on c++, and visual express c++ seemed a good place to start.

    I installed both SDK and VC++ as described in the link provided in one of the previous posts:

    http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx

    Umps... what shall I say, it was one day work, but something does not work and it is very subtle error. When I generate win32 executable (in win32 mode, other computer does not have .NET), it runs on my labtop but not on another pc. I am testing this since I collaborate with experimental group and I want to see whether I can just put my programs on their computer to use.

    For example, if I compile within visual studio c++ express (using menues such as build project), executable does not run on another machine (that does not have .NET installed). On the other hand, if I compile it on the command prompt, the one offered within visual studio, it strangely, works. The code is bellow (really simple test program):

    #include <stdio.h>

    void main()
    {
            printf ("Win32, it's happenin'!");
    }

    I think that visual studio c++ express is good program and would like to use it. But it is somewhat disturbing that the outcome of my compilation/buildup depends on whether I use command prompt or not.

    I would be very, very grateful if someone could help me with this. Now after whole day spent on this I think I am giving up for today.

    Zoran

    p.s. Is there a way to query from command line (or some other way) whether my executable is prepared for .NET or no .NET platform? (At the moment since I do not have good understanding of environment I am testing this by copying executable to antother PC that does not have .NET installed and try to run it there, really time consuming practise). 

    Well, the old rule in action, if something is wrong assume it is your fault. I am half through reading a book on introductory course to c++ and what I used above is far from being any c++ code. No wonder it does not work on the other machine. When you screw up then you have to pray to Gods that compiler will fix your mistake or correct inconsistency (stdio.h is c code).

    Tuesday, April 4, 2006 7:34 AM
  • Ahhhhhhhhhhh, come on guys!!! What is that?

    I know I am not Intelligent but VISUAL C++ since its first version was created to build native applications. When I saw it for free I was sure it...ahhh, let it be.

    So, what may we hope from a FREE tool made by Microsoft!!!!

    My business is back to DevCPP and GCC.

    JRZiviani

    Friday, April 14, 2006 12:55 AM
  • good grief...that just fixed everything

    thanks for this info

    why in the world that was not in the sdk instructions is beyond me.

    thanks again

    James

    Friday, April 28, 2006 8:28 PM
  • c'mon, that's just an excuse... If I tell any of my customers that I'm sorry, I don't give you this because of download without any explanation whatsoever of anything, they won't be happy with me.

    And as long as I remember, students also will need the basics, as most of books with c and c++ will use the windows.h. This is frustrating...

    Monday, May 8, 2006 5:10 PM
  • I have copied files into the "bin", "include" and "lib" from PSDK-ISO. The problem with include files as <windows.h> was removed , but problem with linker occures. It is the error LNK2019: unresolved symbol many times. Is posible to run Express C++ as sharp at all?

    Please, could you give me the advice, what shall I have to do.

    M.M.

    Friday, June 2, 2006 2:27 PM
  • Its not that we DON'T know how to do these things to get native code working, its the fact that we have to do them at all in the first place. I'm trying to learn win32 programming by following some tutorials and I thought (keyword would be thought) that VSCEE would be the easiest to work with. So far its been 3 hours for me to copy and paste a simple window program that just has one window (And I haven't got it to work yet!). This is very annoying and time consuming, maybe Bill should spend more time on his products than giving his money away.
    Friday, June 30, 2006 8:09 AM
  •  Jochen Kalmbach wrote:
    The easiest procedure to use the PSDK with VC2005 Express is:

    1. Create a directory "PlatformSDK" under "%ProgramFiles%\Microsoft Visual Studio 8\VC"
    2. Copy the "bin", "include" and "lib" directory from the PSDK-installation into this directory.

    Then you do not need to change any config file.

    Newest PSDK-ISO is available at:
    http://www.microsoft.com/downloads/details.aspx?FamilyId=D8EECD75-1FC4-49E5-BC66-9DA2B03D9B92 
    -- Greetings Jochen My blog about Win32 and .NET http://blog.kalmbachnet.de/

     

    did this and i still get errors:

     

    ------ Build started: Project: Win32A, Configuration: Debug Win32 ------

    Compiling...

    Main.cpp

    c:\documents and settings\user\my documents\visual studio 2005\projects\win32a\win32a\main.cpp(26) : error C2440: '=' : cannot convert from 'const char *' to 'LPCWSTR'

    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

    c:\documents and settings\user\my documents\visual studio 2005\projects\win32a\win32a\main.cpp(44) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char *' to 'LPCWSTR'

    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

    c:\documents and settings\user\my documents\visual studio 2005\projects\win32a\win32a\main.cpp(62) : warning C4244: 'return' : conversion from 'WPARAM' to 'int', possible loss of data

    Build log was saved at "file://c:\Documents and Settings\user\My Documents\Visual Studio 2005\Projects\Win32A\Win32A\Debug\BuildLog.htm"

    Win32A - 2 error(s), 1 warning(s)

    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

     

     

    Its not the same cannot find windows.h but still, its not working.

     

    I did exactly what ure post said, no luck.

    Friday, June 30, 2006 8:13 PM
  •  Jochen Kalmbach wrote:
    The easiest procedure to use the PSDK with VC2005 Express is:

    1. Create a directory "PlatformSDK" under "%ProgramFiles%\Microsoft Visual Studio 8\VC"
    2. Copy the "bin", "include" and "lib" directory from the PSDK-installation into this directory.

    Then you do not need to change any config file.

    Newest PSDK-ISO is available at:
    http://www.microsoft.com/downloads/details.aspx?FamilyId=D8EECD75-1FC4-49E5-BC66-9DA2B03D9B92 
    -- Greetings Jochen My blog about Win32 and .NET http://blog.kalmbachnet.de/

     

    I copied the all the files from the SDK into the bin specified and got the following errors.

    error C2731: 'WinMain' : function cannot be overloaded

    example\winmain.cpp(16) : see declaration of 'WinMain'

    example\winmain.cpp(49) : error C2440: '=' : cannot convert from 'const char [15]' to 'LPCWSTR'

    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

    example\winmain.cpp(64) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [15]' to 'LPCWSTR'

    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

    .

    please help

     

    suggest that in future products make it so that when you install the sdk

    it installs so it will work. the programer should never deal with this

    as a programer and a user of this product. I should be able to install

    and use. think of your customers. programing is hard enough as it is

    we really don’t need all this extra stuff. having the sdk separated did not

    bother me but please make it so it works right out of the box/install.

    Thank you. And please take my words as consideration for fixing this error for

    future release. This is not a small error and needs to be fixed.

    Sunday, July 23, 2006 4:14 PM
  • can some one give me the number for the department for the sdk help so i can call the people that can help me with this i realy need it fixed. and maybe if i call them i can get them to understand that this realy needs to be fixed in the next release. that and i realy need my code working today.
    Sunday, July 23, 2006 4:23 PM
  •  Jochen Kalmbach wrote:
    The easiest procedure to use the PSDK with VC2005 Express is:

    1. Create a directory "PlatformSDK" under "%ProgramFiles%\Microsoft Visual Studio 8\VC"
    2. Copy the "bin", "include" and "lib" directory from the PSDK-installation into this directory.

    Then you do not need to change any config file.

    Newest PSDK-ISO is available at:
    http://www.microsoft.com/downloads/details.aspx?FamilyId=D8EECD75-1FC4-49E5-BC66-9DA2B03D9B92 
    -- Greetings Jochen My blog about Win32 and .NET http://blog.kalmbachnet.de/


    I tryed it and it said:

    ------ Build started: Project: Template, Configuration: Debug Win32 ------
    Compiling...
    Edittime.cpp
    ************************ WARNING ****************************
    ***** Do not forget to change the IDENTIFIER in Main.h! *****
    *************************************************************
    General.cpp
    ************************ WARNING ****************************
    ***** Do not forget to change the IDENTIFIER in Main.h! *****
    *************************************************************
    Main.cpp
    ************************ WARNING ****************************
    ***** Do not forget to change the IDENTIFIER in Main.h! *****
    *************************************************************
    Runtime.cpp
    ************************ WARNING ****************************
    ***** Do not forget to change the IDENTIFIER in Main.h! *****
    *************************************************************
    Generating Code...
    Compiling resources...
    Compiling manifest to resources...
    Linking...
       Creating library .\Debug/Template.lib and object .\Debug/Template.exp
    Edittime.obj : error LNK2019: unresolved external symbol __imp__LoadStringA@16 referenced in function "void __stdcall GetObjInfos(class mv *,struct tagEDATA_V1 *,char *,char *,char *,char *,char *)" (?GetObjInfos@@YGXPAVmv@@PAUtagEDATA_V1@@PAD2222@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__EndDialog@8 referenced in function "int __stdcall setupProc(struct HWND__ *,unsigned int,unsigned int,long)" (?setupProc@@YGHPAUHWND__@@IIJ@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__GetWindowLongA@8 referenced in function "int __stdcall setupProc(struct HWND__ *,unsigned int,unsigned int,long)" (?setupProc@@YGHPAUHWND__@@IIJ@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__SetWindowLongA@12 referenced in function "int __stdcall setupProc(struct HWND__ *,unsigned int,unsigned int,long)" (?setupProc@@YGHPAUHWND__@@IIJ@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__DialogBoxParamA@20 referenced in function "int __stdcall CreateObject(class mv *,class LO *,struct tagEDATA_V1 *)" (?CreateObject@@YGHPAVmv@@PAVLO@@PAUtagEDATA_V1@@@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__GetSubMenu@8 referenced in function "void __cdecl menucpy(struct HMENU__ *,struct HMENU__ *)" (?menucpy@@YAXPAUHMENU__@@0@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__CreatePopupMenu@0 referenced in function "void __cdecl menucpy(struct HMENU__ *,struct HMENU__ *)" (?menucpy@@YAXPAUHMENU__@@0@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__GetMenuState@12 referenced in function "void __cdecl menucpy(struct HMENU__ *,struct HMENU__ *)" (?menucpy@@YAXPAUHMENU__@@0@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__GetMenuStringA@20 referenced in function "void __cdecl menucpy(struct HMENU__ *,struct HMENU__ *)" (?menucpy@@YAXPAUHMENU__@@0@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__AppendMenuA@16 referenced in function "void __cdecl menucpy(struct HMENU__ *,struct HMENU__ *)" (?menucpy@@YAXPAUHMENU__@@0@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__GetMenuItemID@8 referenced in function "void __cdecl menucpy(struct HMENU__ *,struct HMENU__ *)" (?menucpy@@YAXPAUHMENU__@@0@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__GetMenuItemCount@4 referenced in function "void __cdecl menucpy(struct HMENU__ *,struct HMENU__ *)" (?menucpy@@YAXPAUHMENU__@@0@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__DestroyMenu@4 referenced in function "struct HMENU__ * __cdecl GetPopupMenu(short)" (?GetPopupMenu@@YAPAUHMENU__@@F@Z)
    Edittime.obj : error LNK2019: unresolved external symbol __imp__LoadMenuA@8 referenced in function "struct HMENU__ * __cdecl GetPopupMenu(short)" (?GetPopupMenu@@YAPAUHMENU__@@F@Z)
    .\Debug/Template.mfx : fatal error LNK1120: 14 unresolved externals
    Build log was saved at "file://c:\Documents and Settings\John\Desktop\ODUH GAMES\MMF2SDK\Extensions\Blah\Debug\BuildLog.htm"
    Template - 15 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Tuesday, August 15, 2006 2:53 PM
  • Understand that Ted meant an extra download is needed to do native app development.  It makes sense considering that not all people should have to take a 500 megabyte download to do .NET development for free.
    Tuesday, August 15, 2006 3:07 PM
  • For the sake of a good take-away (and to filter through all the unnecessary rants), exactly what bug is being described in this thread, when does it occur, and what's its workaround?
    Tuesday, August 15, 2006 3:11 PM
  • Ok, I downloaded Platform SDK also. What should I do next?. I read a lot of instructions, can anybody give us simplified instructions? Or maybe, any Microsoft people can make some readable tutorial on this subject (at download pages please!!). I spent many hours searching for help, additionally, the link http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx doesn't work anymore.....
    Monday, September 4, 2006 8:01 PM
  • What I wanted to do was compile and run one wxWidgets (Win32) program using the free Visual Studio Express 2005. Here is what I had to do to get it working:

    I downloaded the VC.iso file (the Express 2005 C++ ISO image) and then I used Microsofts VCDControllTool to access to iso image (or you can burn it to a CD or use a free program such as DiskPrivate).

    I also downloaded the Windows Platform SDK (the small one, not the big one) PSDK-x86.exe (1.26 MB) and ran that and installed to the default directory.

     

    I then started Visual C++ 2005 Express and under Options, Projects and Solution I added:

    Executable files: 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

    If you do not fix this, you will get errors about not being able to find windows.h etc.

    Then exit and restart to make sure it remembers all three of them.

    I then downloaded and unzipped the latest version of wxWidgets, and loaded the Calendar project, allowing it to convert the project.

    I then clicked on Project, Properties, Linker, Input, Additional Dependencies and made sure the folllowing were all in the list (or else you will get unresovled externals to Windows API).

    user32.lib
    gdi32.lib
    oleaut32.lib
    ole32.lib
    comdlg32.lib
    shell32.lib
    winmm.lib
    comctl32.lib
    rpcrt4.lib
    wsock32.lib
    odbc32.lib
    advapi32.lib

    With that I was able to compile the example and debug it!

    Sunday, September 17, 2006 6:27 PM
  • Neither of the described methods work for me.

    I tried both methods,but now i just get

    1>LINK : fatal error LNK1181: cannot open input file 'user32.lib,gdi32.lib,oleaut32.lib,ole32.lib,comdlg32.lib,shell32.lib,winmm.lib,comctl32.lib,rpcrt4.lib,wsock32.lib,odbc32.lib,advapi32.lib'


    Even with the additional dependencies added.


    Any help?


    Thanks.
    Tuesday, October 3, 2006 3:30 AM
  • remove the commas from your list of dependencies, and insert spaces instead.
    Tuesday, October 3, 2006 2:18 PM
  • thank you so much, this has been giving me trouble for days

    I didn't know about all those additionanl dependencies that had to be added

    it's working perfectly for me now

    Tuesday, October 17, 2006 8:38 PM
  •  

     i have downloaded and added to all th ecorrect files but something is still wrong

    when i run my program this comes up:

    1>------ Build started: Project: game, Configuration: Debug Win32 ------

    1>Compiling...

    1>CBall.cpp

    1>c:\documents and settings\setup\my documents\visual studio 2005\projects\cball.h(23) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    1>CBricks.cpp

    1>c:\documents and settings\setup\my documents\visual studio 2005\projects\cbricks.h(24) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    1>CDirectDrawGame.cpp

    1>c:\documents and settings\setup\my documents\visual studio 2005\projects\cdirectdrawgame.h(26) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    1>CPaddle.cpp

    1>c:\documents and settings\setup\my documents\visual studio 2005\projects\cpaddle.h(25) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    1>CSuperBrickBreaker.cpp

    1>c:\documents and settings\setup\my documents\visual studio 2005\projects\cdirectdrawgame.h(26) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    1>WinMain.cpp

    1>c:\documents and settings\setup\my documents\visual studio 2005\projects\winmain.cpp(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    1>Generating Code...

    1>Project : warning PRJ0018 : The following environment variables were not found:

    1>$(Program Files)

    1>Build log was saved at "file://c:\Documents and Settings\setup\My Documents\Visual Studio 2005\Projects\game\game\Debug\BuildLog.htm"

    1>game - 6 error(s), 0 warning(s)

    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

     it still doesnt like windows.h

     

    please help

     

    Saturday, November 4, 2006 12:12 AM
  • Ben_userdn, you're a genius.

    Adding these library files:

    user32.lib
    gdi32.lib
    oleaut32.lib
    ole32.lib
    comdlg32.lib
    shell32.lib
    winmm.lib
    comctl32.lib
    rpcrt4.lib
    wsock32.lib
    odbc32.lib
    advapi32.lib

    Cleared up the unresolved symbol reference linker errors for me.  YOU ROCK MAN!

    Monday, November 6, 2006 7:19 PM
  • Ben_userdn You are a life safer.

    I have spent all day trying to solve this problem in many different ways.



    Thank you so very much.

    I think you should be enquiring to Microsoft for them to pay you to fix there bugs




    Thanks



    Mike
    Saturday, November 11, 2006 5:29 PM
  • I'm 27 and I have been programming for 17 years.  I remember working at McDonald's and saving up 300 so I could get the student version of Borland C++ 4.x/5.x when I was 15.  Understanding linking, dlls, libs and all those concepts always hindered me.  I just wanted to program.  Every time I've said, "Ok, today, I will try and learn c++ again...", I've ended up spending the whole day just trying to get a 'Hello World' application off the ground.  From there, I end up running out of memory or experiencing weird crashes that after hours of trying to resolve without success, would lead to my finally giving up thinking I just wasn't smart enough and all the people who KNOW what they're doing are too busy to help.

    I would think there's got to be a basic (IDE independant) checklist of not more than 10 items that some senior programmer could come up with to help us new commers understand what common things can keep a program from compiling and running correctly.  Though, there may be, I have not seen anything around that's very concise.  I don't quite have the technical prowess to know exactly what I'm talking about but over the years, this is a little of what I've learned about compiling/linking with different c++ IDEs.  I think it might be a start.

    1. Directories/Paths to dlls/libs/headers(.h)

    These paths have to be set up properly.  Most IDEs tend to have global and per project/solution settings, so and check for both.  I've found it is sometimes a good policy to be redundant.

    2. dlls sometimes need to be explicitely given in options or settings. kernal32, user32 ... and like 12 others are needed for a win32 app to compile.

    3. apparently, sometimes config files need to be manually edited.  The current instructions for installing/using the PSDK ( http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/ ) state that you have to manually edit the corewin_express.vsprops file.

    4. Know if your building your app in Debug, Debug(Auto), Release or other mode.  I was getting a message saying I couldn't debug because the debug info wasn't with my exe, yet I was in Debug(Auto) mode, switched to just 'Debug' mode and I was able to debug.

    I'm a wuss, I've stuck to easy languages that do not require linking and compiling.  But I'm tired of not having absolute control over my data structures(i.e. not being able to use polymorphism) and having to write my own wrappers when I need to use native code.  So I'm giving in and I'm going to trudge through all the red tape so I can write applications that do whatever my heart desires and aren't limited by language performance or syntax.

     

    Saturday, December 16, 2006 10:45 PM
  • Every time I build my application this is what the program returns:

    ------ Build started: Project: FlyFF jumphack, Configuration: Debug Win32 ------

    Compiling...

    FlyFF jumphack.cpp

    c:\werk\c++\flyff jumphack\Form1.h(164) : error C2664: 'FindWindowW' : cannot convert parameter 2 from 'const char Devil' to 'LPCWSTR'

    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

    c:\werk\c++\flyff jumphack\Form1.h(167) : error C2872: 'MessageBox' : ambiguous symbol

    could be 'C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winuser.h(7205) : int MessageBox(HWND,LPCTSTR,LPCTSTR,UINT)'

    or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::MessageBox'

    c:\werk\c++\flyff jumphack\Form1.h(167) : error C2872: 'MessageBox' : ambiguous symbol

    could be 'C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winuser.h(7205) : int MessageBox(HWND,LPCTSTR,LPCTSTR,UINT)'

    or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::MessageBox'

    c:\werk\c++\flyff jumphack\Form1.h(167) : error C2664: 'MessageBox' : cannot convert parameter 2 from 'const char [65]' to 'LPCTSTR'

    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

    c:\werk\c++\flyff jumphack\Form1.h(178) : error C2872: 'MessageBox' : ambiguous symbol

    could be 'C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winuser.h(7205) : int MessageBox(HWND,LPCTSTR,LPCTSTR,UINT)'

    or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::MessageBox'

    c:\werk\c++\flyff jumphack\Form1.h(178) : error C2872: 'MessageBox' : ambiguous symbol

    could be 'C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winuser.h(7205) : int MessageBox(HWND,LPCTSTR,LPCTSTR,UINT)'

    or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::MessageBox'

    c:\werk\c++\flyff jumphack\Form1.h(178) : error C2664: 'MessageBox' : cannot convert parameter 2 from 'const char [26]' to 'LPCTSTR'

    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

    Build log was saved at "file://c:\Werk\C++\FlyFF jumphack\Debug\BuildLog.htm"

    FlyFF jumphack - 7 error(s), 0 warning(s)

    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    This is driving me insane, i've been bussy trying to get the SDK to work for an whole day, but there are stil some wrong things... Can annyone help me on this one?

    Thursday, January 11, 2007 11:00 AM
  • Hi im starting in the 3D programming world and not very good with C++. when i compile a ready made 3D program it says windows.h is not found but i cannot find why it needs to exist what it is and how to get it. I believe this thread was made with this question and skimming through I still have not found an answer.

    I have Microsoft C++ 2005 Express edition, I am trying to build Mech Commander 2 Souce and would apreciate any help.

    Thursday, February 15, 2007 2:56 PM
  • While many proposed solutions don't work for the Free VS Express 2005, heres another solution that worked for me after researching for hours and messing around with all the configs:

    Edit the following file:
    %Program Files%\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat

    ***Assuming that you have followed the instructions: http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
    ***(Need to do Step 2 - Install the Platform SDK over the Web from the Download Center. Follow the instructions and install the SDK for the x86 platform.)

    add at the end of each set line the following:
    @set PATH= ......(original stuff)....;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin;%PATH%
    @set INCLUDE=......(original stuff)....;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include;%INCLUDE%
    @set LIB=......(original stuff)....;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib;%LIB%

    This will do the trick, enjoy




    Thursday, February 15, 2007 5:15 PM
  • thanks i cant say this works yet but ehen i find out i will tell you
    Friday, February 16, 2007 8:34 AM
  • Nicky's suggestion works when you do command line builds.  For IDE builds, you can edit the include and lib paths under the Tools, Option, Projects and Solution tab.
    Friday, February 16, 2007 2:12 PM
  •  Ben_userdn wrote:


    ...

    I then clicked on Project, Properties, Linker, Input, Additional Dependencies and made sure the folllowing were all in the list (or else you will get unresovled externals to Windows API).

    user32.lib
    gdi32.lib
    oleaut32.lib
    ole32.lib
    comdlg32.lib
    shell32.lib
    winmm.lib
    comctl32.lib
    rpcrt4.lib
    wsock32.lib
    odbc32.lib
    advapi32.lib

    With that I was able to compile the example and debug it!



    Yes!!! Thank you!

    For the record, I had a very similar problem to most others here:
    Installed VC 2005 E, installed the platform SDK, followed the instructions at http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx and got a pooload of link errors.

    The above fixed it. So do i do that for every project now or can i set it globally? sure i'll figure that out...

    My god though... wading through all this lot just to get a simple IDE installed and running makes you realise what Macs are really for... an easy life!!!
    Friday, February 16, 2007 4:05 PM
  • ya I also did not get
    Thursday, February 22, 2007 8:03 AM
  • No my thing still does not work. im going to try other C++ compilers see if that gets me any results
    Saturday, February 24, 2007 9:52 AM
  •  

     John, most compilers require you to add directory phaths to either includes files ( .h ), libraries files ( .dll ) and or resourses files ( .rc or .src )  The reson they are not always or partially included is the crasy amount of different platforms one can choose to create apps or games like OpenGL, Win32, Direct3d or DX(0.8, 0.9, 10...), Irrlight engines, DevCpp engines and so on and so forth. A bunch of people want credit and royalties on our projects and products the least of which is Microsoft.

      But do not despair, here is a common solution for Visual Express:

     Click on "tool" at the top of your application then -> down to "options".

    In the popped window, click on "VC++ directories" . Now, on your right hand side, a draw down menu lets you decide which of the include or resourses you can attach to your project or the entire Visual Studio environment ( which I recommand since they do not have to be used all the time but don't hurt to be read by the compiler if needed or not )

    once you've done that, a browse window will pop up, just choose which directory you can find your includes or src's or dll's. 

    If your computer does not have them ( mine did not ) Just go ahead and download DevCpp. It is a very good compiler, allows you to learn C++ and pretty much do anything VC++ allows you to do, only support for DX need to be added . ( if you need more info on that, captnfreedom2000@yahoo.com , and I'll be happy to help you guys.) but devcpp has all the includes and dll's you could ever want. 

    Monday, March 26, 2007 4:58 PM
  • Why can't somebody just post the stupid file online somewhere?  A friend and I installed Visual C++ 2005 Express just like jwellsntr and have the exact same gorramn problem.  Instead of doing some actual programming, we spent the whole evening in an epic battle with the GAR (Grand Army of Redmond).  Normally I'm a big fan of Microsoft (again, like jwellsntr), but this is ridiculous.  Way too much trouble when all I wanted was to make Minesweeper.
    Monday, April 2, 2007 3:07 PM
  • Thank you very much for this post.

     

    This works well for the same problem in Visual C++ Express codename Orcas

     

    Bill

    Friday, April 27, 2007 4:43 AM
  • There is a mistake in the video.

    When adding the three folders to the VC++ options, you need to select the correct entry from the "Show Directories for:" drop-down list at the top right hand corner of the screen.

    Select "Executable Files" before adding "$(ProgramFiles)\Microsoft Platform SDK\Bin"

    Select "Library Files" before adding "$(ProgramFiles)\Microsoft Platform SDK\Lib"

    Select "Include Files" before adding "$(ProgramFiles)\Microsoft Platform SDK\Include"

    Hope that helps.
    Thursday, June 21, 2007 1:21 PM
  • I came to the same conclusion. I have been trying to hook up the Half-Life 2 source code with VC++ 2005 EE and I found mostly through googling that it could be possible. Well, that is the reason i have it on my computer. Now I found someone else's free for inspection VS 6 solution, which I amply upgraded to VS 8 (note/edit: i did not use the solution to get anything running, i was trying to get it running). To get it running (built) I needed a windows.h file. Constructing the solution in Dev-C++ might work with some dabbling, since it has the necessary include file, but I went on to Visual Studio because it seemed to be the originally used IDE. To get to the point, which I was approaching anyway, the folders are in a list of hierarchy. I do not know how to get the environmental variables working (except for the %% ones) in order to use the defaults, and i do not know where some of the folders should be on my disk.

    Anyhow, thanks to all of you for this thread!

    // Mangie

     

    PS:http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/environment_variables.mspx?mfr=true
             http://www.workspacewhiz.com/SolutionBuildEnvironmentReadme.html

           I still won't bother...

    PPS:if  you have problems with "Fatal error RC1015: cannot open include file 'afxres.h'." Googling made me find http://www.winprog.org/tutorial/errors.html#RC1015

    DS.

    Thursday, June 28, 2007 11:04 PM
  • I just wanted to share my experience in getting my code to compile.

    I was interested in getting into DirectX programming with C++ and after giving up on working with the MinGW compiler with Eclipse IDE. All roads seem to point to developing with VC++.

    Obviously before I considered buying any product i wanted to try it out. So i got VCEE.


    http://www.riemers.net/eng/Tutorials/DirectX/C++/Series1/tut1.php

    Working closely with above tutorial i set about writing my code. But quickly came across the issue this thread lead to.


    So here's what to do. (I'll do every step so i don't miss anything out)

    • Download/Install: VC++EE

    http://msdn.microsoft.com/vstudio/express/downloads/default.aspx

    • Download/Install: Microsoft ® Windows Server® 2003 R2 Platform SDK Web Install

    http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en

    • OPTIONAL: I'm writing a Windows application so I took the following step:

    In Visual C++ Express, the Win32 Windows Application type is disabled in the Win32 Application Wizard. To enable that type, you need to edit the file AppSettings.htm file located in the folder “%ProgramFiles%\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\".

    In a text editor comment out lines 441 - 444 by putting a // in front of them as shown here:
    // WIN_APP.disabled = true;
    // WIN_APP_LABEL.disabled = true;
    // DLL_APP.disabled = true;
    // DLL_APP_LABEL.disabled = true;

    Save and close the file and open Visual C++ Express.


    • I then created a new project and selected ‘Windows Application’ and ticked the ‘empty project’ tick box.
    • Now we follow the directions give wisely by Ben_userdn

    I then started Visual C++ 2005 Express and under Options, Projects and Solution I added:

    Executable files: 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

    Make sure this is the directory you installed the platform SDK. Mine, for example was

    “C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\”

    If you do not fix this, you will get errors about not being able to find windows.h etc.

    Then exit and restart to make sure it remembers all three of them.

    I then clicked on Project, Properties, Linker, Input, Additional Dependencies and made sure the folllowing were all in the list (or else you will get unresovled externals to Windows API).

    user32.lib
    gdi32.lib
    oleaut32.lib
    ole32.lib
    comdlg32.lib
    shell32.lib
    winmm.lib
    comctl32.lib
    rpcrt4.lib
    wsock32.lib
    odbc32.lib
    advapi32.lib

    Just copy and paste the list above into the filed after you click the “…” button on the field.

    • Ok nearly there now. Right click on the “source files” folder on your created project and go add à new item and create a new .cpp file and call it summing. Eg. Main.cpp
    • Copy the following code into it

    #include<windows.h>

    LRESULT CALLBACK OurWindowProcedure(HWND han_Wind,UINT uint_Message,WPARAM parameter1,LPARAM parameter2)

    {

    return DefWindowProc(han_Wind,uint_Message,parameter1,parameter2);

    }

    HWND NewWindow(LPCTSTR str_Title,int int_XPos, int int_YPos, int int_Width, int int_Height)

    {

    WNDCLASSEX wnd_Structure;

    wnd_Structure.cbSize = sizeof(WNDCLASSEX);

    wnd_Structure.style = CS_HREDRAW | CS_VREDRAW;

    wnd_Structure.lpfnWndProc = OurWindowProcedure;

    wnd_Structure.cbClsExtra = 0;

    wnd_Structure.cbWndExtra = 0;

    wnd_Structure.hInstance = GetModuleHandle(NULL);

    wnd_Structure.hIcon = NULL;

    wnd_Structure.hCursor = NULL;

    wnd_Structure.hbrBackground = GetSysColorBrush(COLOR_BTNFACE);

    wnd_Structure.lpszMenuName = NULL;

    wnd_Structure.lpszClassName = "WindowClassName";

    wnd_Structure.hIconSm = LoadIcon(NULL,IDI_APPLICATION);

    RegisterClassEx(&wnd_Structure);

    return CreateWindowEx(WS_EX_CONTROLPARENT, "WindowClassName", str_Title, WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_VISIBLE, int_XPos, int_YPos, int_Width, int_Height, NULL, NULL, GetModuleHandle(NULL), NULL);

    }

    int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPreviousInstance,LPSTR lpcmdline,int nCmdShow)

    {

    HWND han_Window = NewWindow("DirectX C++ Tutorial",100,100,500,500);

    Sleep(5000);

    DestroyWindow(han_Window);

    return 0;

    }



    • Try and build this and you should get a nice error message like this
    error C2440: '=' : cannot convert from 'const char [16]' to 'LPCWSTR'

    and a load of other horrible stuff.
    This is fixed by going back to the properties and selecting Configuration Properties and going to the Character Set settings and changing it to ‘Use Multi-Byte Character Set’

    Try it now and all should be dandy!

    Please bug me if i missed something! Smile


    Pete.
    Friday, July 13, 2007 4:41 PM
  • I tried all methods here, even the Pete_Town one, and I compile this hello world:

     

    #include "windows.h"

    int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)

    {

      MessageBox (NULL, TEXT ("hello"), TEXT ("world!"), 0) ;

      return 0 ;

    }

     

    Guess what? BAMMMM! it errors!!!

     

    ------ Build started: Project: t5, Configuration: Debug Win32 ------
    Compiling...
    t5.cpp
    j:\cs372\t5\t5\t5.cpp(12) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
    Build log was saved at "file://j:\cs372\t5\t5\Debug\BuildLog.htm"
    t5 - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Tuesday, July 24, 2007 10:57 AM
  • I just want someone to give me windows.h to download. If you wonder why this sucks. Microsoft intensionally makes Express suck so you will buy PRO and get better quality. (I sure did.) But I'm using my mom's laptop and it doesn't have PRO. Plus, microsoft got so hyped up in C#, they didn't finish the C++ tools, and left it to rot.
    Wednesday, July 25, 2007 5:36 PM
  • Raiden_S you've got to turn off precompiled headers in the project settings

     

    change 'Configuration Properties -> C/C++ -> Precompiled Headers' - to not use precompiled headers.

    Wednesday, July 25, 2007 5:53 PM
  • 1) It seems and feels more like new users are being manipulated towards MS's latest and greatest. There's nothing I hate more than being forced into doing something by people who deliberately remove choices. It's far more welcoming to move onto something new simply because it is a good idea rather than be forced to do so.

    2) Is a moot issue. If you had desired to leave people a choice in this, it would have been simple enough to include an option in the installer that would drop in the platform SDK if you wanted it, but defaulted to off so people dont necessarily need huge downloads. This decision seems more motivated by the desire to remove choices than anything else.

    I too, am back to cygwin.
    Monday, July 30, 2007 1:34 AM
  • Jochen,

    any thanks for the method described by you on how to tell C++ compiler where to find the header files. I did try to use the method mention by you but when I ran compiler, it said lots of directx header files were missing, that were nowhere to be found on XP computer.

    It seems that over the past 8 months, slowly all my project templates like WIN32, and MFC have gone missing from C++ 2005 Express., including most of the header files from SDK folder. Was there something sent in the MS update patches that has wiped-out templates and most of the header files: such as windows.h, and objbase.h etc files from SDK.

    About year ago when I was using some really cool sample projects from SDK Feb 2006 they were working absolutely fine, all projects loaded OK, and compiled OK but when in August 2007 when I tried to use same sample projects that I have already saved they all failed to compile, more then half the files in the project were missing. So, after reinstalled August 2007 SDK, I tried to install sample projects for C++ but they all failed to compile with message saying that most of the header files to be used to set up Direct X header files where missing. So I searched the computer but no trace of windows.h or objbase.h etc and WINMAIN, and WINPROC, Hinstance etc were none existence instruction according to compiler. And also when I tried to create new C++ project for MFC and WIN 32, the project templates had disappeared too., nowhere to be found on the xp computer. But the SDK sample program worked OK in Executable mode! So, where are these header files hiding J

    Also RNX projects and compiler is working OK.

    So, what plans dose ‘So tall and mighty big headed Microsoft’ has for people who love to write fun programs using directx for C++? Can Microsoft produce 2 final version SDK for C++ for programmers who will keep their old XP computer , but may also get hold of Vista too. One version up to 450Mb or less for those people who have 52k internet connection and the other full version of SDK with all previous header files that works with C++ 2005 Express.

    So, Microsoft should produce two final version of SDK for XP computers user who will hug onto their C++. One version with no missing headers, and other smaller version for school kids and college students who just want to experiment with C++. And leave these final version of SDK for good in that full working state rather then fiddle around with it to produce new formats that totally refuse to work with SDK project templates due to missing files, and please only updates bugs. And still further call that final SDK as fully working final version for 2005 C++ Express, and get rid of any previous version.

    And Microsoft should from their on move on to Direct X 10 for vista and again produce just two fully working version of SDK for each of C++ and RNX. And please make it very clear in bold letters that one smaller version is not for Direct X games because files are missing from it, and other is full version with no files missing and in full working order and will work with sample projects in SDK.

    It is nightmare to see how much total incoherence in SDK is pouring out of Microsoft L

    Please produce working SDK that are mentioned in 100s of academic literatures for C++.

     

    Monday, September 17, 2007 3:14 AM
  • Jonathan,

    Jonathan,

    Many thanks for your explantion for why C++ 2005 Express dose not work for writing codes for DirectX games.

     

    It seems that over the past 8 months, slowly all my project templates like WIN32, and MFC have gone missing from C++ 2005 Express., including most of the header files from SDK folder. Was there something sent in the MS update patches that has wiped-out templates and most of the header files: such as windows.h, and objbase.h etc files from SDK.

    About year ago when I was using some really cool sample projects from SDK Feb 2006 they were working absolutely fine, all projects loaded OK, and compiled OK but when in August 2007 when I tried to use same sample projects that I have already saved they all failed to compile, more then half the files in the project were missing. So, after reinstalled August 2007 SDK, I tried to install sample projects for C++ but they all failed to compile with message saying that most of the header files to be used to set up Direct X header files where missing. So I searched the computer but no trace of windows.h or objbase.h etc and WINMAIN, and WINPROC, Hinstance etc were none existence instruction according to compiler. And also when I tried to create new C++ project for MFC and WIN 32, the project templates had disappeared too., nowhere to be found on the xp computer. But the SDK sample program worked OK in Executable mode! So, where are these header files hiding J

    Also RNX projects and compiler is working OK.

    So, what plans dose ‘So tall and mighty big headed Microsoft’ has for people who love to write fun programs using directx for C++? Can Microsoft produce 2 final version SDK for C++ for programmers who will keep their old XP computer , but may also get hold of Vista too. One version up to 450Mb or less for those people who have 52k internet connection and the other full version of SDK with all previous header files that works with C++ 2005 Express.

    So, Microsoft should produce two final version of SDK for XP computers user who will hug onto their C++. One version with no missing headers, and other smaller version for school kids and college students who just want to experiment with C++. And leave these final version of SDK for good in that full working state rather then fiddle around with it to produce new formats that totally refuse to work with SDK project templates due to missing files, and please only updates bugs. And still further call that final SDK as fully working final version for 2005 C++ Express, and get rid of any previous version.

    And Microsoft should from their on move on to Direct X 10 for vista and again produce just two fully working version of SDK for each of C++ and RNX. And please make it very clear in bold letters that one smaller version is not for Direct X games because files are missing from it, and other is full version with no files missing and in full working order and will work with sample projects in SDK.

    It is nightmare to see how much total incoherence in SDK is pouring out of Microsoft L

    Please produce working SDK that are mentioned in 100s of academic literatures for C++.

     

    Monday, September 17, 2007 3:20 AM
  •  

    1>c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'

    1>c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(222) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

    1>c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5940) : error C2146: syntax error : missing ';' before identifier 'Buffer'

    1>c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

    1>c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

    1>c:\cdx\include\cdxsurface.h(252) : error C2248: 'CDXScreen:Tongue TiedetSurfaceScreen' : cannot access protected member declared in class 'CDXScreen'

    1> c:\cdx\include\cdxscreen.h(144) : see declaration of 'CDXScreen:Tongue TiedetSurfaceScreen'

    1> c:\cdx\include\cdxscreen.h(90) : see declaration of 'CDXScreen'

    1>c:\cdx\include\cdxsurface.h(253) : error C2248: 'CDXScreen:Tongue TiedetSurfaceWidth' : cannot access protected member declared in class 'CDXScreen'

    1> c:\cdx\include\cdxscreen.h(146) : see declaration of 'CDXScreen:Tongue TiedetSurfaceWidth'

    1> c:\cdx\include\cdxscreen.h(90) : see declaration of 'CDXScreen'

    1>c:\cdx\include\cdxsurface.h(254) : error C2248: 'CDXScreen:Tongue TiedetSurfaceHeight' : cannot access protected member declared in class 'CDXScreen'

     

    Please  ..  can anyone help me   ?    I have try download the PSDK from the above link and install it as well.  but "Why the code (as shown) from microsoft has a compile error ?"   How can I do ?

     

    The code of CDX (Game Direct X engine)  also has compile error.

     

    I use VC++ 2005 .  These  error I have never found on VC++ 6.0 

    Friday, September 28, 2007 2:37 AM
  • > 1) It is a starter product: the "typical" customer we foresee for the Visual C++ Express Edition is a student

    > who is interested in learning C++.

     

    How old do you expect these students to be ? Younger than teenagers ?

    People (even students) want something that works well "as-is" or can be upgraded to work better.

     

    When you download _any_ Microsoft SDK the SDK should expect that the person will be using it with a Microsoft compiler (anyone wishing to use a MS SDK with Cygwin or GCC is on thier own) and the SDK installer should check the registry for MS compilers -- having found such, the SDK installer should 'fix' the MS compiler.



    > 2) It is a product that you download: therefore even in these days of broadband we needed to keep

    > down the size of the product.

    Thats OK, but let's have these things work correctly.

     

    > Combine these two statements and you see why we didn't include the Platform SDK - it was just too

    > big. As Ayman, and many other people, have pointed out you can, if you really want the PSDK, then

    > you can download it separately. While there were issues with the integration of the PSDK with the

    > Beta-2 release of the Visual C++ Express Edition these have been fixed with the final Whidbey release.

     

    "fixed with the final Whidbey release"

     

    No, it is not, nor is it "fixed" with Orcas Beta2.

     

    Try compiling ffdshow (ffdshow_beta3_rev1324_20070701_src.7z) and see what happens http://downloads.sourceforge.net/ffdshow-tryout/ffdshow_beta3_rev1324_20070701_src.7z?modtime=1183541500&big_mirror=0

     

    (PS: you need to integrate Yasm yourself (not MS's fault), get it at: http://www.tortall.net/projects/yasm/wiki/Download ).

     

    There is an enormous amount of software that can be compiled with Cygwin GCC (on WinXP) or GCC on Linux, and it usually compiles without error (at least it is supposed to). The worst it gets is that you are missing a library and must compile that first and re-run ./configure .

     

    Ffdshow is freeware that requires a Microsoft compiler for ease of compiling (you could mess around with Cygwin and get these types of programs (Win GUI) to compile but it takes more effort).

     

    Microsoft can get this freeware for free. Unless Microsoft would like to provide a hugh repository of free sourcecode as an alternate they should expect that people would desire to compile C++ sourcecode obtained off the net.

     

    We won't blame you for the bugs in this free sourcecode from unknown sources but we would enjoy it if your programs worked with your programs (SDK's integrated correctly with MS C++) and we could compile this free sourcecode with little

    effort -- IE:

    1. unzip the source,

    2. double-click the ".sln" file,

    3. click build,

    4. (hopefully) no errors.

     

    With Linux and GCC you can often type "./configure", "make", "make install" -- and everything works ...

     

    Wednesday, October 10, 2007 2:36 PM
  • I am happily using the free Visual Studio 2005 C++ Express to compile native Windows C++ applications that require windows.h. I am curently using it to develop a a wxWidgets application that compiles fully and runs fine.

     

    How did I set it up to work you ask? Well lucky for you I typed up all the fine details and steps for future reference right here:

     

    http://www.codeproject.com/useritems/FreeVS2005Win32.asp

     

    I also disapprove of Microsoft trying to "encourage" us to go .NET by making the tool not support native C++ by default. Why not give people what they want? Especially if it can be done using a few small changes. Let people choose which platform is the best for their application and needs. If NET is so great, people should switch by themselves.

     

    In case it is relevant, I have not installed SP1 for studio. If you want SP1 I suggest you install the express studio and service first, and then follow the other steps.

    Wednesday, October 10, 2007 2:57 PM
  • The DLL source included "windows.h" and "winbase.h". I can not find these anywhere. Are these not part of the Express editiion
    ...
    Monday, January 28, 2008 2:23 PM
  • Tried this but it doesn't work.  The "windows.h" file is not in the directories.

    Monday, February 18, 2008 4:46 PM
  • With the Visual Studio 2008 Express versions you can build Win32 applications right out of the box.  You no longer have to manually integrate the Windows SDK content with VC++ Express.  Windows.h is installed by default to C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\windows.h.

     

    The Visual Studio 2008 editions are seamlessly integrated with the Windows SDK.  VS2008 editions include the same Vista RTM headers and libraries that shipped in the Microsoft Windows  Software Development Kit Update for Windows Vista released in March, 2007.

     

    See post below for detailed instructions on how to work with Visual Studio 2008 and the Windows SDK.

     

          K a r i n   M e i e r

    Windows SDK | Samples & Community PM

    http://blogs.msdn.com/KarinM

     

     

    Tuesday, February 19, 2008 6:19 AM
  •  

    Cheers on the info!

    ----------------------------------------
    Fred Reckling
    Microsoft 2008 Joint Launch Team
    http://www.microsoft.com/2008jointlaunch/

    Friday, February 22, 2008 12:36 AM
  • Using Visual C++ Express with the Windows SDK (short version)

     

     This article describes what you need to do to build Win32 applications using Visual C++ Express and the Windows SDK for Windows Server 2008 and .NET Framework 3.5.  A more detailed explanation including screenshots can be found here.

     

    With the Visual Studio 2008 Express versions you can build Win32 applications right out of the box.  You no longer have to manually integrate the Windows SDK content with VC++ Express.

     

    The Visual Studio 2008 editions are seamlessly integrated with the Windows SDK.  VS2008 editions include the same Vista RTM headers and libraries that shipped in the Microsoft Windows  Software Development Kit Update for Windows Vista released in March, 2007. The SDK tools included with VS2008 editions are more recent than those that ship in the Vista Update SDK and the Windows Server 2003 Platform SDK.

     

    If you install another SDK, such as the Windows SDK for Windows Server 2008 and .NET Framework 3.5 after you install VS, you are ready to develop with the headers, libraries and tools in the SDK for Windows Server 2008.  Read on if you installed the SDK before installing Visual Studio.  (It’s easy to switch back if you want.) 

     

    Here’s how:

    Step 1: Install Microsoft Visual C++ 2008 Express.

    Step 2: Install the Windows SDK for Windows Server 2008 and .NET Framework 3.5.

    You’re done.  After installing the Server 2008 SDK, the registry key is set to point to the new Server 2008 SDK (v6.1) content.  If you installed the Windows Server 2008 SDK before you install Visual Studio, you will need to use the SDK Configuration Tool to set the directories.  If you want to switch back to the default (Vista v6.0A) headers and libraries that were installed with VS 2008, you should use the new SDK Configuration Tool to select the v6.0A SDK content.

    Step 3: Use the SDK Configuration Tool to update the Visual C++ directories

    The Windows SDK for Windows Server 2008 includes a new SDK Configuration Tool that sets the Visual Studio include, library and tools directories for you.  This tool allows you to switch quickly between the headers, libraries and tools in the installed Windows SDK(s) and those that are embedded in Visual Studio.  If you install the Windows Server 2008 SDK before you install Visual Studio, you will need to use the SDK Configuration Tool to set the directories manually.

     

     The SDK Configuration Tool has a GUI interface but it works only on the Visual Studio Retail (non-Express) SKUs.  (This is scheduled be fixed in the next release.) You will use the SDK Configuration tool at the command line with VC++ Express.

     

    1.       Launch the Windows SDK Command Window (Start, All Programs, Microsoft Windows SDK v6.1, Command Window)

    2.       CD to \Program Files\Microsoft\Windows\v6.1\Setup>

    3.       Type:  WindowsSdkVer.exe -version:v6.1

     

    This command will set the Windows SDK for Windows Server 2008 (v 6.1) as the “current” SDK for Visual Studio to use for headers, libraries and tools.  Use ‘-version:v6.1’ for the Windows Server 2008 SDK content.  Use ‘-version:v6.0A’ for the Visual Studio 2008 content. 

     

    Step 4: Validate that the directories were updated.

    Open the VC++ Express command window and check the PATH to see if the v6.1 directory has been added.

    How to switch directories back to the SDK content that shipped ‘in the box’ with VC++ 2008 Express

    Use the SDK Configuration Tool at the command line to make v6.0A the current version.

     

    Karin Meier

    Windows SDK Program Manager

    This posting is provided “AS IS” with no warranties, and confers no rights.

    send feedback to wsdkfb@microsoft.com

     

     

    Friday, February 22, 2008 6:02 AM
  • I installed VC++ 2008 Express.

    Afterwards I installed Windows SDK V6.1.

    I started Windows SDK configuration tool and it tells me that it neither found VS2005 nor VS2008.

     

    This could be because I do not have VS2008 but just VC++ 2008, or it could be that some environment variables where not set correctly during installation of VC.

    (Infact the only environment variable that was set was "VS90COMNTOOLS=D:\VC8\Common7\Tools\ ", with "D:\VC8" as installation path, no entry was added to the path variable and also the registry does not contain entries like "VCInstallDir").

     

    I will try to add the SDK paths manually to the search directories. If this does not help I will try if the workaround from Kalmbach also works for my combintion and plan C  would be to roll back to VC6 (I'm maintaining old programs primarily).

     

    Regards

    Chilli

     

    BTW. nowadays where I even choose to donwload complete MSDN package for VS2008, the bandwidth constraint is not so much of an argument anymore for not offering the SDK

    • Proposed as answer by zeureo Monday, December 14, 2009 5:47 AM
    Thursday, March 6, 2008 3:22 PM
  • Chilli, thank you very much for calling my attention to the broken feedback link for the Windows SDK.  This is a bug in the Release Notes and we are updating the online release notes immediately to show the correct alias: winsdkfdb@microsoft.com.  

     

    I’m sorry you’ve had this problem with the Windows SDK. You may find the answers you need  in this blog post, including how to specify different parameters at the SDK Configuration Tool at the command line and how to validate that running the tool was successful.  If this doesn’t help, I’m happy to help you troubleshoot.  I have a couple of questions that will help me understand your issue.  Please answer as many as you can.  You’re welcome to email me directly.

     

    1.       Is your computer processor an X86 or X64?

    2.       Were you running the SDK Configuration Tool at the command line or in GUI mode? 

    3.       Do you also have Visual Studio 2005 or another version of VS installed?

    4.       Did you install the SDK to the default location during setup?

    5.       Did you deselect (uncheck) any SDK components during setup?  If so, do you remember which?

    6.       Did you install VS 2008 Express to the default location during setup?

    7.       Do you have this directory on your computer?

    o   If your computer is X64: %\Program Files\Microsoft Visual Studio 9.0\VC

    o   If your computer is X64: %\Program Files (x86)\Microsoft Visual Studio 9.0\VC

     

    A bit more info for you:

    1.       If you want to use the Vista RTM headers, libraries and tools with VS 2008 Express, you do not need to install the standalone SDK.  The Windows SDK for Vista components are embedded in every Visual Studio 2008 edition.

    2.       The VC++ 2008 Express version is considered Visual Studio 2008. If you installed any Visual Studio 2008 Express SKU you have Visual Studio 2008 installed and should have the directories in question 7 on your machine. 

    3.       The Windows SDK Configuration tool does not work in GUI mode on the VS Express versions.  Learn more in this blog post, including how to specify different parameters at the command line and how to validate that running the tool was successful.

    4.       The Windows SDK Configuration tool works by altering the Visual Studio 2008 directories through a registry key setting.  (The tool works differently with Visual Studio 2005.)

    ·         On an X86 computer: HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows

    ·         On an X64 or IA64 computer: HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows

     

    Good luck!

     

    --Karin

    ||Karin Meier||Windows SDK PM||Build Environment.Samples.Community|| http://blogs.msdn.com/KarinM||

    Thursday, March 6, 2008 6:53 PM
  • Hi Karin,

    I was going through the blog. I have found your mail id and sending my problem.

    I am working on Window 7 with VisualStudio2008 and using intel complier  Intel(R) C++ 11.1.051 [Intel(R) 64] for building our product.

    We are basically porting our 32-bit VC++ application to 64-bit system.

    I am finding this error

    "1>.\..\DecoderBase.h(4): catastrophic error: could not open source file "..\common.h"
    1>  #include "..\common.h"
    1>                        ^
    1>
    1>compilation aborted for .\DShowDecoder.cpp (code 4)
    1>Build log was saved at "file://\\eiw900505\view_
    store\rdang_view3\goldeneye\src2\Decoders\DShowDecoder\x64\Release\BuildLog.htm"
    1>DShowDecoder - 1 error(s), 0 warning(s)".

    The Normal vc project builds properly but the intel compilers project is not able to locate the common.h file. If I give the full path there when including common.h then it takes and builds properly.

    And again i tried including the common.h and some other files in Force Include option in C/C++ Advanced options.

    Now it is able to include these files but it is not build again. It is giving the error
    "1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxv_w32.h(16): catastrophic error: #error directive: WINDOWS.H already included.  MFC apps must not #include <windows.h>
    1>      #error WINDOWS.H already included.  MFC apps must not #include <windows.h>
    1>       ^
    1>
    1>compilation aborted for .\DShowDecoder.cpp (code 4)"

    If i am missing anything can you suggest to move further.

    Thanks in advance.
    --
    with regards,
              BRN Prasad
    Thursday, March 25, 2010 6:18 AM
  • Thanks, it works.
    Friday, June 4, 2010 7:39 AM