Ad hoc use of a NIF

Roger Lipscombe roger@REDACTED
Tue Mar 24 11:37:49 CET 2020


On Tue, 24 Mar 2020 at 10:33, Harris, Robert
<robert.harris@REDACTED> wrote:
> I was planning to have the make process (called from rebar) for a's NIF
> use an escript to load it in order to generate b.erl.  This doesn't work
> because, as far as I can tell, I can't load a NIF from the shell.

No, you can't. The module that loads the NIF needs to match the
declaration in the NIF. More precisely: the name of the calling module
must match the first argument to ERL_NIF_INIT.

But: you could load 'a' from the shell (or from escript), and invoke
it that way, no?


More information about the erlang-questions mailing list