d3dcoder / d3d12book

Sample code for the book "Introduction to 3D Game Programming with DirectX 12"
1.47k stars 571 forks source link

Don't know how to setup the running environment in the book in Visual Studio2015 #9

Open anonymous-one-now opened 7 years ago

anonymous-one-now commented 7 years ago

I have try to find some ways to setup the environment by GOOGLE, but I can't find a good way to setup the environment as the book. But I still try to setup the environment as some other blogs say and I try to run it, it will pop up a window showing: Error: The system can not find the path specified. So if you not mind, I hope you could show me or tell me the way how to setup the good-running environment as the book. THANKS sincerely. :)

WaltN commented 7 years ago

Here's the checklist that I use with VS 2015 Community:

  1. Fire up VS 2015 and start a New Project. When the new project dialog box appears, select Visual C++ > Win32 from the project types. Select an appropriate project name, and select a directory (with a solution folder if desired). Click OK.
  2. When the new dialog comes up, select Application Settings in the left-hand pane. Be sure that Windows application is chosen and the Empty project box is checked. Click Finish.
  3. Add starter source code to the project folder (in a Source folder if desired). Right-click on the project name in Solution Explorer and select Add > Existing Item, selecting the source code you added to the project folder.
  4. Right-click on the project name and Add > Existing Item for any header or source files considered Common. (I’m a bit uncertain how this works for C++. I tried it when the common code was in a non-adjacent folder, and I couldn’t get the includes to work – at least not without making full directory specifications in the includes. I ended up copying the .h and .cpp files into an adjacent Common folder.) Also, .h and .cpp files for d3dApp, d3dUtil, MathHelper, and GameTimer are likely used in many samples; they reside in Common and can be referenced as Existing Items.
  5. Right-click on the project name and select Properties. Under Configuration Properties > General, make sure Target Platform Version is set to an appropriate Windows 10 version. The project may now be built and debugged.
  6. Before launching the program, make sure that you copy into the project any shader files required.