How to use Lua FFI with C++ functions
<p>I have followed <a href="https://github.com/Atcold/Torch-Developer-Guide/blob/master/FFI-so/README.md" rel="nofollow">this</a> tutorial to create an FFI interface to some C code to torch</p>

<p>However, it doesn't work for C++ functions. Is it even possible, if so how?</p>

<p>I created a shared library from the C++ file (simple.cpp) like so:</p>

<pre><code>g++ -Wall -shared -fPIC -o libsimple.so simple.cpp
</code></pre>