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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Mike Williams
Forwarding mail.

On 27 Jan 2017 1:55 p.m., "ukasiu (JIRA)" <[hidden email]> 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)

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions