Hi

I'm having some issues turning asn1c's output into a library that I can use from other projects. I'm using the latest master (commit 4cc779) because 0.9.28 gave me some additional problems.

I really don't get it. I think I'm missing something important. Could you please enlighten me? Questions:

  1. Is the -gen-autotools flag expected to be working? asn1c is spitting me the same converter-example.mk and Makefile.am.asn1convert files regardless of the flag's existence.
  2. Why was ASN_MODULE_HEADERS removed in this commit? The autotools no longer install the headers without manual intervention. Is there some other way I'm supposed to get the declarations of the API from user code?
  3. Is it possible to append a prefix to the expected #include locations? And if not, why?

For example:

#include <Rectangle.h>

Doesn't that pollute the global namespace? I mean, if I add to Makefile.am:

ASN_MODULEdir=$(includedir)/subdirectory

Then I have to compile somewhat like this:

gcc main.c -I/usr/local/include/subdirectory

Rather, wouldn't it be better if asn1c would allow the API to define some #include prefix:

#include <subdirectory/Rectangle.h>

Then I can compile cleanly, in addition to being able to define some other Rectangle.h for some other purpose:

gcc main.c
 

Last edit: Alberto Leiva Popper 2018-09-13