<div dir="auto">Forwarding mail.</div><div class="gmail_extra"><br><div class="gmail_quote">On 27 Jan 2017 1:55 p.m., "ukasiu (JIRA)" <<a href="mailto:bugs.erlang.org@gmail.com">bugs.erlang.org@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ukasiu created ERL-345:<br>
--------------------------<br>
<br>
Summary: Cannot compile NIFs for modules with dots in name<br>
Key: ERL-345<br>
URL: <a href="https://bugs.erlang.org/browse/ERL-345" rel="noreferrer" target="_blank">https://bugs.erlang.org/<wbr>browse/ERL-345</a><br>
Project: Erlang/OTP<br>
Issue Type: Bug<br>
Reporter: ukasiu<br>
Attachments: fast_compare.c<br>
<br>
I'm trying to compile NIF with {{STATIC_ERLANG_NIF}} to use in Elixir. {{ERL_NIF_INIT}} looks like this {{ERL_NIF_INIT(Elixir.<wbr>FastCompare, nif_funcs, NULL, NULL, NULL, NULL)}} -- {{MODNAME}} contains dot. I'm getting this when trying to compile:<br>
<br>
{noformat}<br>
In file included from fast_compare.c:2:0:<br>
fast_compare.c:20:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token<br>
ERL_NIF_INIT(Elixir.<wbr>FastCompare, nif_funcs, NULL, NULL, NULL, NULL)<br>
^<br>
.../erts-8.2.1/include/erl_<wbr>nif.h:264:51: note: in definition of macro 'ERL_NIF_INIT_DECL'<br>
# define ERL_NIF_INIT_DECL(MODNAME) ErlNifEntry* MODNAME ## _nif_init(ERL_NIF_INIT_ARGS)<br>
^<br>
fast_compare.c:20:1: note: in expansion of macro 'ERL_NIF_INIT'<br>
ERL_NIF_INIT(Elixir.<wbr>FastCompare, nif_funcs, NULL, NULL, NULL, NULL)<br>
^<br>
fast_compare.c:20:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token<br>
ERL_NIF_INIT(Elixir.<wbr>FastCompare, nif_funcs, NULL, NULL, NULL, NULL)<br>
^<br>
.../erts-8.2.1/include/erl_<wbr>nif.h:264:51: note: in definition of macro 'ERL_NIF_INIT_DECL'<br>
# define ERL_NIF_INIT_DECL(MODNAME) ErlNifEntry* MODNAME ## _nif_init(ERL_NIF_INIT_ARGS)<br>
^<br>
fast_compare.c:20:1: note: in expansion of macro 'ERL_NIF_INIT'<br>
ERL_NIF_INIT(Elixir.<wbr>FastCompare, nif_funcs, NULL, NULL, NULL, NULL)<br>
^<br>
{noformat}<br>
<br>
<br>
<br>
<br>
--<br>
This message was sent by Atlassian JIRA<br>
(v6.4.7#64022)<br>
</blockquote></div></div>