Mathematica 12 has a new function
FunctionCompileExportLibrary, which can export a pure function as a
.dll file like this:
FunctionCompileExportLibrary["function.dll", Function[ Typed[arg, "MachineInteger"], arg + 1]]
But how to call it in an external program (e.g., visual studio)? I have no
.h file, I have no
.lib file. I even don't know the function name that I want to call... Can anyone tell me how to use it?
The documentation of
FunctionCompileExportLibrary states that
The library generated by FunctionCompileExportLibrary is suitable for linking into external programs. It can also be loaded into the Wolfram System using LibraryFunctionLoad.