Re: asn1ct: cant build asn files with names which does not agree with module name

Björn Gustavsson <[email protected]> Mon, 11 May 2015 06:11:49 +0200
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <CA+yh78SswP1hBXYe5kZmakxO2aKjmH6mapRWPZYRCV9EjRft-w@mail.gmail.com>
On Sun, May 10, 2015 at 8:06 AM, yannay livneh <[email protected]> wrote:
> Hello,
>
> asn1ct can't build asn1 file which contain module with name that is not the
> basename of the file.

Yes. asn1ct assumes that the name of the ASN.1 spec and
the basename of the file are the same. If there is an
IMPORT statement in an ASN.1 spec, asn1ct will assume
that the spec to be included is in a file whose basename is
the same as the name of the spec. Therefore, it would not
be trivial to lift the restriction that basename of the file and
the of the ASN.1 spec must be the same.

Therefore, you must rename your spec file to
RFC1157-SNMP.asn.

However, there is a way to force the name of the
generated erlang module to be named 'snmp'.
See the description of multi-file compilation in the
User's Guide. Here is a direct link:

http://www.erlang.org/doc/apps/asn1/asn1_ug.html#id62887

(This link works now but we still stop working when we
release OTP 18.)

/Björn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB
_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs