Did you use CMake to generate the Visual Studio solution? Why do you have #include "stdafx.h"?
#include "stdafx.h"