Run c++ code with electron


If i am having most of my application being built upon electron but i want the output of a c++ script i wrote that uses opencv libraries and therefore cannot be turned into a javascript file through emscripten. The problem being that where electron uses an index.html file i would like something that would give me the same functionality as if it were an index.php file, i would like this so i could use the exec() function in php to grab the out put of the script at any point during runtime, with the way electron is built how should i go about trying to do something like this?


Electron is using nodejs, so you can still package cpp code as a node module and then use it as dependency in your electron app.

Here’s the docs for the latest node version (5.6 as time of writing), but you should probably look for one for the version of node shipped in electron:


but when I try to implement it in the electron app its throws an error saying : could not locate binding file. Tried…(no error number even). what to do at such unknown error?