I have some cpp files and I want to combine them with LuaJit using FFI.
But the problem is that I have to add extern "c" characters for almost every function so that FFI can get them.
extern "c"
Is there an easier way to do this?
Several functions can be placed inside one extern "C" block. This allows you to type extern "C" only once for each header file.
extern "C"
extern "C" { void function1(); void function2(); }