I'm starting project, and I will have to use external dll written on pure C. How to load external dll (NOT.Net libtaty, if it is important) to use it from Neko or Cpp target in Haxe?
I found out the answer on my question. It is trivial, no nedded special settings for the compiller, no special list of dynamic loaded libraries at compile time.
Just load library at runtime using haxe cpp API like below:
static var sum:Int->Int->Int = cpp.Lib.load("test","sum",2);
or haxe neko API according to your target platform:
static var sum:Int->Int->Int = neko.Lib.load("test","sum",2);
This lines load sum
function from test
library which located in the same directory with executable file.
Read more about it in old haxe documentation.
[1]: http://old.haxe.org/doc/cpp/ffi C Foreign Function Interface