This project has moved and is read-only. For the latest updates, please go here.

Required to copy DirectXTK folder to every project using it?

Jan 6, 2015 at 12:37 PM
Hello,

I have just downloaded DIrectX Tool Kit and would like to add it to my project. I have extracted it to

"D:\C++\DirectXTK"

and would like to add it to a project located at e.g.

"D:\C++\Win32Window\DirectXTKFont"

I have followed the instructions of "Adding to a VS solution", but VS tells me

"Cannot open include file: 'SpriteFont.h': No such file or directory".

Have I simply mis followed the instructions, or do I need to copy the DirectXTK folder to my project?

Thanks for your assistance.
Jan 6, 2015 at 2:26 PM
You will need to update the include path to point to wherever you put the files. Where the setup instructions say:

In your application's project settings, on the "C++ / General" page set Configuration to "All Configurations", set Platform to "All Plaforms", and then add the path $(SolutionDir)\DirectXTK\inc; to the Additional Include Directories properties. Click Apply.

If DirectXTK lives somewhere other than $(SolutionDir), replace that with the actual path.
Marked as answer by SteveHatcher on 1/6/2015 at 7:45 AM
Jan 6, 2015 at 3:45 PM
Edited Jan 6, 2015 at 4:09 PM
ShawnHargreaves wrote:
You will need to update the include path to point to wherever you put the files. Where the setup instructions say:

In your application's project settings, on the "C++ / General" page set Configuration to "All Configurations", set Platform to "All Plaforms", and then add the path $(SolutionDir)\DirectXTK\inc; to the Additional Include Directories properties. Click Apply.

If DirectXTK lives somewhere other than $(SolutionDir), replace that with the actual path.
Hi Shawn,

Thanks for your answer, it was that last bit changing SolutionDir to my actual path that I missed out on.
Jan 6, 2015 at 6:26 PM
I updated the docs to read:
In your application's project settings, on the "C++ / General" page set Configuration to "All Configurations", set Platform to "All Plaforms", and then add the relative path to DirectXTK\inc;--assuming you have the DirectXTK folder in the same directory as your sln file, it should be $(SolutionDir)\DirectXTK\inc;--to the Additional Include Directories properties. Click Apply.
Note if you use NuGet rather than project-to-project references, then it also makes a copy in a packages directory for the project that uses it. A nice feature of this is that if you delete it along with other working folders like ipch, Debug, Profile, Release, ARM, and x64 (say to move the files to another system in a more compact form), then when you build again it will refetch the packages from the network.
Marked as answer by walbourn on 1/6/2015 at 10:26 AM