Re: FFI newby question: importing C functions

  • From: QuentinC <webmaster@xxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 26 Jun 2012 13:17:58 +0200

> what do you mean what it "doesn't work"

When you try to call ffi.C.yourfunction, then you get an error saying that yourfunction can't be resolved.

I don't know if it is because of obscure stdcall naming convention, i.e. "func@XX" unstead of "function". Maybe. I know that people have had binding issues with that in python and java (using respectively ctype and JNA).

> there's no way to manually add a Symbol to the namespace w/o having that symbol exported?

I don't think so. The only way I found it to work is by using __declspec(dllexport) + loading explicitely the exe. All access tries through ffi.C failed on my own.



Other related posts: