Usage of a generic shared/dynamic library (.so, .dll, .dynlib)

Hi. Is it possible to work with generic (non-haxe module: .dso/.ndll) dynamic library (.so, .dll, .dynlib) directly in Haxe (without 3rd-party adapters for each library)?

I’m looking for methods:

  1. how to load dynamic library .so/.dll directly (stdcall).

I’m found 3rd-party extension for haxe: GitHub - TomBebbington/hx-ffi: Haxe 3 FFI library, but it’s have some trouble for hxcpp-target. May be here exists more stardard way for usage shared libraries (with support to exchanging simple data types and strcut/strings via pointers) or other library, who can do this?

  1. compile haxe-class to dynamic library (stdcall).

For example

class ShrCls {
public static function summ (a:int, b:Int) : Int return a + b;
}

Is it possible to compile this class to .so/.dll library (“libshrcls.so” or “shrcls.dll”) via HXCPP and then call method summ from this module into C/Delphi/Java/…-application?

Thanks.