What is exactly a ndll ?

545 views
Skip to first unread message

Marcelo de Moraes Serpa

unread,
May 18, 2012, 12:18:30 PM5/18/12
to haxe...@googlegroups.com
I know that it's some kind of shared library (like a Windows DLL or Unix SO) but I'd like to know more about it, like how is it created, relationship between targets (neko,cpp), use-cases…; the information is scarce and spread around, and I didn't find any article that actually talks about it.

- Marcelo

Laurence Taylor

unread,
May 18, 2012, 12:34:58 PM5/18/12
to haxe...@googlegroups.com
I'm not the most qualified on this subject, but an ndll is a dll with the express purpose of marshalling data between neko (and more recently haxec++) and c / c++. The neko foreign function interface is here and describes the interfaces for bi-directional communication. 

On Fri, May 18, 2012 at 6:18 PM, Marcelo de Moraes Serpa <fullofc...@gmail.com> wrote:
I know that it's some kind of shared library (like a Windows DLL or Unix SO) but I'd like to know more about it, like how is it created, relationship between targets (neko,cpp), use-cases…; the information is scarce and spread around, and I didn't find any article that actually talks about it.

Marc Weber

unread,
May 18, 2012, 12:44:32 PM5/18/12
to haxelang
http://haxe.org/doc/cpp/ffi
HaXe code should contain samples as well as
http://code.google.com/p/npostgres/
for instance

Marc Weber

Joshua Granick

unread,
May 18, 2012, 1:24:04 PM5/18/12
to haxe...@googlegroups.com
It's a dynamic library.

Sometimes the extension is "ndll", but other times the extension is "dylib" or "so", depending on the platform. Technically, you can use the <ndll /> tag in NME to attach any native library to your project.

There's an interface called CFFI that handles communication between Neko or HXCPP, into native code. This is what someone might set up in an NME extension (like the "sqlite" library) or which is used in NME to handle the "glue" between NME's own native "NDLL" library and the high-level code.



On Fri, 18 May 2012 09:18:30 -0700, Marcelo de Moraes Serpa <fullofc...@gmail.com> wrote:

I know that it's some kind of shared library (like a Windows DLL or Unix SO) but I'd like to know more about it, like how is it created, relationship between targets (neko,cpp), use-cases…; the information is scarce and spread around, and I didn't find any article that actually talks about it.

- Marcelo

Marcelo de Moraes Serpa

unread,
May 18, 2012, 5:02:57 PM5/18/12
to haxe...@googlegroups.com
Thanks guys, it makes sense now. I'll look into FFI in general in order to understand a bit more about the subject.

- Marcelo

Marcelo de Moraes Serpa

unread,
May 18, 2012, 5:25:52 PM5/18/12
to haxe...@googlegroups.com
Now, I just found this: http://haxe.org/doc/advanced/haxewithexteralc

That's what I was looking for :)

- Marcelo

Reply all
Reply to author
Forward
0 new messages