Re: luajit cannot call C function

  • From: Florian Weimer <fw@xxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 18 Nov 2014 22:32:47 +0100

* marcelo nicolet:

> The function create_thread is defined in the main C module. As it could be
> seen, the "external" functions (printf and sleep) works ok.
> Any functon to be called must be defined in an external library?

You need to make sure that you export symbols from your main program,
e.g. using -Wl,-E for ELF targets.  I'm not sure if all platforms
support this, though.

Other related posts: