Build native C++ extension


I would like to build a C++ native extension for electron.
I started with the hello sample: I built the node libraries, the sample and tested successfully with node (v4.5.0).
To use with electron I have to build against the electron V8 version. I followed this guide to build the node library: I generated the msvc VS2015 projects, but when I build I get this error:

\cares.vcxproj(360,5): error MSB3073: The command "call ninja.exe -C ..\..\..\..\out\Debug_x64\ cares" exited with code 1.

And this happens for all projects. How can I solve it?