samedi 28 janvier 2017

How to include c++ headers as if they are in the same directory as source file?

I have created a project in Visual Studio from existing sources. I was originally working with clang on my OS X machine and included my headers through the -I include flag.

So my code ends up looking like this:

#include <thread>
...

#include "vec3.h"
#include "Material.h"
#include "Scene.h"
#include "Camera.h"

All of the custom headers reside in a folder called include within my root folder. After setting my Additional Include Directories to the abosulte path of my include folder, Visual Studio requires that I alter my code to this:

#include <thread>
...

#include "include\vec3.h"
#include "include\Material.h"
...

How do I alter my properties to get the effect of the headers being in the same directory as my main.cpp?

Aucun commentaire:

Enregistrer un commentaire