TheCherno / RayTracing

YouTube ray tracing series
MIT License
366 stars 71 forks source link

Wont Build for me ? #2

Closed geoffw123 closed 2 years ago

geoffw123 commented 2 years ago

Thanks for providing this for free.

I followed the instructions here, using latest vs 2022

  1. Clone recursively: git clone --recursive https://github.com/TheCherno/RayTracing
  2. Run scripts/Setup.bat
  3. Open RayTracing.sln and hit F5

I cant get the sln to build, get various files not found, not sure if I have missed something or there is a path missing in the sln setup ?

A selection of the errors I get 1>C:\RayTracing\Walnut\vendor\imgui\imgui.h(60,10): fatal error C1083: Cannot open include file: 'float.h': No such file or directory 2>C:\RayTracing\Walnut\vendor\glfw\include\GLFW\glfw3.h(103,10): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory

4>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\include\yvals.h(12,10): fatal error C1083: Cannot open include file: 'crtdbg.h': No such file or directory 4>Done building project "RayTracing.vcxproj" -- FAILED.

Any thoughts on how to fix this would be appreciated, thanks.

Soilcsi commented 2 years ago

looks like you didnt installed windows10 sdk. Install it from the Visual Studio Installer.

geoffw123 commented 2 years ago

Thanks for the feedback, I had already got Win 10 sdk installed. However after your suggestion I did some more tinkering and managed to fix the problem. If anyone else hits this problem here is what I did

Using the visual studio installer, click on the individual components tab, then right at the bottom you see the Win10 sdk versions available, the middle numbered version was the one ticked originally, I cleared this and then ticked the higher number version and then clicked modify. Then back in visual studio, right click on the ray tracing project in the solution explorer and click retarget solution, and then select Windows 10 sdk "latest installed version".

The project then rebuilt without errors.