So I had a bit of time this morning and finally upgraded to visual studio 2010. There are a lot of changes but I am really enjoying it. It is a definite improvement over VS2008, some features that I have been begging for for years are finally in and the interface has been cleaned up significantly.
The new help system takes a bit of getting used to but it is only the first version and they promised that some massive improvements are coming.
Now Getting DX integrated with VS2010 was a bit tricky as the installer doesn’t automatically as the SDK include and lib folders to the default include/lib folders as it did in VS 2008, and it requires a bit of fiddling.
Setting up the Include and Library Paths
They removed the global VC path system accessible through the options dialog and have opted for a per-project path system with several global user files. This mean that for every single project that you make that uses the DX API you will need to add in the DX SDK directories manually via the project properties -> VC++ Directories (I’d personally recommend this technique since it allows projects to be more portable) but if you are lazy, you can add the SDK paths to the default c++ project settings template stored in the glocal cpp user file. This is done as follows:
Step 1: Open up the “Property Manager” under the “View” menu.
Step2: Expand the project/configurations tree and select the “Microsoft.Cpp.X.user” user file. Right click and select “Properties”.
Step3: Add the DX SDK include and Lib folders to the appropriate VC++ directories. Use the $(DXSDK_DIR) macro to future proof the setting. Click Ok, then exit VS2010, you will be prompted to save the user file, click yes and from now on the DXSDK folders will be set for any future C++ projects!
Linking the DirectX Static Libraries In Your Projects
Step1: Select the project properties from the project menu.
Step2: Expand the “Linker” section and select “Input” and under “Additional Dependencies” add the necessary lib files (D3D10.lib & D3DX10.lib).
NOTE: Make sure you select “All Configurations” from the drop down list in the top left hand corner, otherwise the lib files will only be loaded for the currently selected configuration.
And thats all there is to it! Now you will be able to include any directX headers without any problems (just remember to include the library files under the linker input for extra headers like DXGI)





Glad I found your page at the start of the Google search “add directx sdk visual studio 2010″ from the UK.
Tam
Posted by touristtam | February 5, 2011, 8:19 pmyeah, well, ive checked everywhere on my project properties. The linker section does not exist on it anywhere. Why can i not see it?
Posted by Ivyn | May 10, 2011, 4:14 amTools -> Settings -> Expert Settings
Posted by Daniel | September 5, 2012, 8:22 pmmake sure that you have at least one cpp file in the project before trying to set the linker options. They dont appear until you do.
Posted by Bobby | May 11, 2011, 10:25 amThis would have saved me close to 50k if I had seen this several months earlier…
Posted by Papa_Mudd | August 10, 2011, 4:28 amThanks for this good sir!
Posted by hogsyhogsy | November 27, 2011, 12:31 amThank you! I’ve looked for this solution before but never stumbled on your blog until today.
Posted by drivenbyhim | April 14, 2012, 8:56 pmThanks I started to code in DirectX again and forgot where to put the header files.
Posted by Jimmy | June 11, 2012, 7:09 amReblogged this on itech.
Posted by rohits134 | July 3, 2012, 2:07 pmThank You very much.
I cannot just set include and lib directories via properties for about 80 of ClanLib examples.
I must make it globally.
Posted by Michal | July 14, 2012, 11:31 amThank you. You have help me upgrade a VC++ 2008 DirectX game to use VC++2010.
Posted by Jason Alls | August 23, 2012, 10:07 amAfter setting up it and follow every single step, I still have the error/s:
error C2061: syntax error : identifier ‘__RPC__out_xcount_part’
error C2059: syntax error : ‘)’
fatal error C1903: unable to recover from previous error(s); stopping compilation
and so on
Any help??
Posted by Víctor Caballero | November 8, 2012, 11:11 pmthanks man, was wasting so much time trying to get this to work
Posted by Michael Callaghan | December 12, 2012, 3:05 amThanks great work sir.
I’m a Newbie, follow all steps u suggest, when run, it shows an error.
With heading “xxxxx.exe – Application Error”
and content “The application was unable to start correctly (0xc000007b).Click OK to close the application.”
Please help me….
Thanks in advance!
Posted by zay | December 28, 2012, 4:38 pmnice guide! works!
Posted by shaki | February 8, 2013, 7:27 pm