Linking the microsoft platform SDK to VS 2005 express

Hi, i have read through various threads regarding methods to link the microsoft platform SDK to visual studio 2005 express beta 2.
Personally i have tried changing the express.dll.config file to "C:\Program Files\Microsoft Visual Studio 8\..." where I include the path to where my microsoft platform SDK is located. Well that doesnt work. So i tried the "create a PlatformSDK folder under VC folder" method. Now afxwin.h is located in C:\microsoft platform SDK\include\mfc so basically i changed the folder name to PlatformSDK and put it in the VC folder. Well that didn't work as well. What happened is i will still receive an error message saying :

STDAFX.CPP

c:\hsanew\datacom\stdafx.h(10) : fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory

Now the funny thing is when i copy afxwin.h from the mfc folder into the include folder, VS 2005 finds the file! So i copied everything from the mfc folder into the include folder and finally get no more "cannot open include file" errors, but after this i get weird errors like "sscanf was declared deprecated, please check definition". I also get errors like " ii is not declared" but when i mouse over "ii" in VS its pop-up bubble shows "int ii". So i do not know whether its because of my unorthodox method of linking the libraries that has caused this problem or is it because the solution i'm opening is a VC++6 solution. Wld appreciate any help. Thanks in advance. 



Answer this question

Linking the microsoft platform SDK to VS 2005 express

  • leunam

    Ok, thanks alot! Doing a repair/re-install now, hopefully it will work cause i've been stuck at this problem for days :(
  • Dhabales

     Ayman Shoukry wrote:
    Try adding the include directories you need by using the compiler options /I.

    For example, to add directory c:\mydir while compiling t.cpp, you wil do somthing like "cl /Ic:\mydir t.cpp". You can add to the compilation command by going to the solution properties -> configuration settings --> C\C++ ->Command Line.

    Hope this helps!

    Thanks,
      Ayman.


    Hi, thanks for the reply. I tried adding "cl /Ic:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\mfc datacom.cpp" to the additional options section in the command line tab. I ended up with this warning:

    mfc datacom.cpp

    c1xx : fatal error C1083: Cannot open source file: 'cl /Ic:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\mfc datacom.cpp': Invalid argument

    As to the second reply, I believe the .dat file only exists if you had a previous version of beta installed. Anyway i did perform a search on my system and did not find the file.


  • Passerelle

    Sorry, my bad. I manually located the .dat file and deleted it. Followed the other instructions Tarek suggested as well. Ended up with this:

    Project : error PRJ0003 : Error spawning 'cl.exe'.

    Creating browse information file...

    Project : error PRJ0003 : Error spawning 'bscmake.exe'.

    May I know what these errors mean  Thanks :)


  • THoffman

    The option is /I only and not the full cl. cl.exe is actually the compiler.
    So you will need to add /I<your directory path where the includes are>

    see http://msdn2.microsoft.com/library/73f9s62w(en-us,vs.80).aspx.

    By the way, I would really recommend Tarek's suggestion in the above post if you are unfamiliar with the cl command use.

    Thanks,
      Ayman Shoukry
      VC++ Team

  • Brad Cowart

    I've tried my hand at Tarek's suggestion before. One problem i experienced was that we cannot change the library paths directly in VS express 2005 beta 2. There was no advice on how to change the VCProjectEngine.dll.express.config file. The only available advice was to modify that specific file. It would be helpful if an example can be listed there cause i'm not really familiar with how to modify that xml file. I'm sure alot of other users are also unsure on how to modify that file. Thanks in advance. :)


  • pgpkeys

    The most up-to-date instructions are at: http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx

    Please make sure you notice the line where it says to delete the 'vccomponents.dat' file.

    THanks,
    Tarek Madkour



  • santoshkumark

    Try adding the include directories you need by using the compiler options /I.

    For example, to add directory c:\mydir while compiling t.cpp, you wil do somthing like "cl /Ic:\mydir t.cpp". You can add to the compilation command by going to the solution properties -> configuration settings --> C\C++ ->Command Line.

    Hope this helps!

    Thanks,
      Ayman.

  • David Bosley

    After you have a clean build, apply Tarek's suggestion to be able to use the PSDK with the express build of VC 2005.

    Thanks,
      Ayman Shoukry
      VC++ Team

  • AjmalAmeen

    That means that the IDE is not able to locate cl.exe (the compiler).

    I would recommend a re-install.

    Thanks,
      Ayman Shoukry
      VC++ Team

  • Linking the microsoft platform SDK to VS 2005 express