0

I am beginning to study DirectX12. In Visual Studio 2019 when attempting to compile a code ( the code from page xxx to page xxxiii of the Introduction ( the box example ) in Frank Luna's '3D game programming with DirectX12' ), I get this error ( the last part is in english ):

1>C:\Users\Maurizio\Desktop\intro\Box\BoxApp.cpp(11,10): fatal error C1083: Non è possibile aprire il file inclusione: '../../Common/d3dApp.h': No such file or directory

Well, I added that file to the solution but the compiler says it can not find it. I performed my research and I found something similar:

cannot open include file d3dx9.h no such file or directory

d3dx11 lib not found

I am just a student and unfortunately I can not solve the issue by myself so I would be grateful if some kind EXPERT souls look at it :-)

cppstudent
  • 23
  • 4
  • "added that file to the solution" - where did you put the file? (looks like the Common folder should be off the desktop folder in your path). The simplest approach is probably to just grab the [entire repository](https://github.com/d3dcoder/d3d12book) (in there its '''d3d12book\Chapter 6 Drawing in Direct3D\Box\BoxApp.cpp''' and '''d3d12book/Common/d3dApp.h''') – Brits Jan 24 '20 at 01:55
  • Brits .... you are a saint, an hero and my personal savior !!! :-)))) I am new to this site and I do not know how to do it but, if there are ways to reward you please let me know !!! And, for the editor, this man deserves a medal: it is the simplest way ever described on how to load in Visual Studio the exercises from Frank Luna's book and have them running – cppstudent Jan 24 '20 at 11:16
  • I just have an additional question. Would you be so kind to post here a basic empty code to make excercises in DX12 with all the headers so I can use it for my experiments ? The code does not need to perform any task. I will fill that part by myself. Thank you again !! ( in any case ) – cppstudent Jan 24 '20 at 11:20
  • No worries - I have posted an answer which you can accept if you want. Doing so gives the author reputation points and, more importantly, means the question has an accepted answer (so someone else with the same type of question can find it and those looking to answer a question can see that this one is resolved). Re your other question - I don't actually use DX12 (last used C++ seriously years ago) so thats not something I can help with (I would have thought that the book would have provided something?). – Brits Jan 24 '20 at 21:49
  • I understand, I asked just because I wanted to have a 'frame of reference' for my 'experiments' that I want to try with DX12 as soon as possible ( I can not wait ! ) before the end of the book .Thank you a lot, anyway ! :-) – cppstudent Jan 25 '20 at 07:20

1 Answers1

0

As per the comments the issue was most likely that the header file was in the wrong folder. The simplest approach for using these examples is probably to just grab the entire repository (in there the files in question are '''d3d12book\Chapter 6 Drawing in Direct3D\Box\BoxApp.cpp''' and '''d3d12book/Common/d3dApp.h''')

Brits
  • 14,829
  • 2
  • 18
  • 31
  • I solved my problem with the simple action of using the folders in the "entire repository" you suggest instead of using those downloadable from the author's site. They compiled perfectly right away :-) – cppstudent Jan 25 '20 at 07:17