[erlang-questions] [Erlang-JIRA] (ERL-345) Cannot compile NIFs for modules with dots in name

Mike Williams michael.c.williams10@REDACTED
Fri Jan 27 14:57:37 CET 2017


Forwarding mail.

On 27 Jan 2017 1:55 p.m., "ukasiu (JIRA)" <bugs.erlang.org@REDACTED> wrote:

> ukasiu created ERL-345:
> --------------------------
>
>              Summary: Cannot compile NIFs for modules with dots in name
>                  Key: ERL-345
>                  URL: https://bugs.erlang.org/browse/ERL-345
>              Project: Erlang/OTP
>           Issue Type: Bug
>             Reporter: ukasiu
>          Attachments: fast_compare.c
>
> I'm trying to compile NIF with {{STATIC_ERLANG_NIF}} to use in Elixir.
> {{ERL_NIF_INIT}} looks like this {{ERL_NIF_INIT(Elixir.FastCompare,
> nif_funcs, NULL, NULL, NULL, NULL)}} -- {{MODNAME}} contains dot. I'm
> getting this when trying to compile:
>
> {noformat}
> In file included from fast_compare.c:2:0:
> fast_compare.c:20:20: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before '.' token
>  ERL_NIF_INIT(Elixir.FastCompare, nif_funcs, NULL, NULL, NULL, NULL)
>                     ^
> .../erts-8.2.1/include/erl_nif.h:264:51: note: in definition of macro
> 'ERL_NIF_INIT_DECL'
>  #  define ERL_NIF_INIT_DECL(MODNAME) ErlNifEntry* MODNAME ##
> _nif_init(ERL_NIF_INIT_ARGS)
>                                                    ^
> fast_compare.c:20:1: note: in expansion of macro 'ERL_NIF_INIT'
>  ERL_NIF_INIT(Elixir.FastCompare, nif_funcs, NULL, NULL, NULL, NULL)
>  ^
> fast_compare.c:20:20: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before '.' token
>  ERL_NIF_INIT(Elixir.FastCompare, nif_funcs, NULL, NULL, NULL, NULL)
>                     ^
> .../erts-8.2.1/include/erl_nif.h:264:51: note: in definition of macro
> 'ERL_NIF_INIT_DECL'
>  #  define ERL_NIF_INIT_DECL(MODNAME) ErlNifEntry* MODNAME ##
> _nif_init(ERL_NIF_INIT_ARGS)
>                                                    ^
> fast_compare.c:20:1: note: in expansion of macro 'ERL_NIF_INIT'
>  ERL_NIF_INIT(Elixir.FastCompare, nif_funcs, NULL, NULL, NULL, NULL)
>  ^
> {noformat}
>
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.4.7#64022)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170127/fc273d52/attachment.htm>


More information about the erlang-questions mailing list