How to get Ray Tracer working in Visual Studio Right now I am reading Peter Shirley's Ray Tracing in One Weekend book, I want to be able to use the provided source code but I am not sure what platform or IDE it was written on, because of this it does not compile in Visual Studio.

Can somebody help me? Whenever I try compiling the code it asks me to 'attach to process'.

How can I get this working? In a few reviews I have read online it says that I'll need to do some tweaking to get it working but I honestly don't know how.
Would it mean rewriting the entire ray tracer as a Win32 Project?
No MakeFile or Visual Studio Solution file is provided. So you will need to do the setup yourself in the Visual Studio IDE. Note that you could just drag and drop the files (.h and .cc are known extensions to Visual Studio) in a new console application if you are not/less familiar with Visual Studio.

The code itself is just plain C++ code. No special stuff. So it does not matter which platform or IDE was used during development. In fact the code is pretty self containing except for

#include &lt;math.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;iostream&gt;
#include "float.h" -&gt; &lt;float.h&gt;


But if your Visual Studio is installed and configured correctly, every console application can just include these headers without any problems. (Just try a basic hello world console application, since the problem has in my opinion nothing to do with the code you want to use.) Note that you need a Win32 Console application and NOT a Win32 Project.

It could be possible that the pre-compiled header file is enabled (StdAfx.h or pch.h) in which case you could disable this or include the header as the first included header in every .cpp file.