-
Notifications
You must be signed in to change notification settings - Fork 1
Links
Take some time to get familiar with a Windows development environment. The links below were good starting points. Eventually I only used Visual Studio to examine the Kinect SDK examples while writing my own code primarily using Sublime Text and Atom, and compiling it via the command line.
Before starting to write the add-on for exposing the Kinect face-tracking, I wrote a very simple "Hello World" add-on to understand the links between the different files. This add-on can be found in the "helloWorldAddon" folder of this repo, with comments throughout. The 'hello.cc' file uses the nan module to expose functions and their outcomes to javascript. The 'sayhello.js' file demonstrates the module in action.
I found the following tutorials to be the most helpful without being overwhelming. As I continued to develop the face-tracking module, I would return to the tutorials when debugging.
- Marcin Baraniecki, Extending Nodejs with Native C Modules
- Tutsplus.com, Writing Nodejs Addons
- Hackernoon.com, Getting Started With Writing C Addons For Nodejs
- Risingstack.com, Writing Native Nodejs Modules
- Nodejs, Node Addon Examples
- Microsoft, Nodejs Guidelines
The key libraries for building native libraries are Node-Gyp and NAN.
- Node-Gyp compiles the add-on while NAN provides a bridge between C++ and Javascript. Node-gyp
- Native Abstractions for Node are the bridge between the C++ and Javascript code Nan
I constantly found myself lost in the Microsoft documentation. These are the links I kept coming back so: