c++ - How can someone define a data type, and then use it in other file that's included in the same file, right after the data type definition -


i needed asn1 ber encoder/decoder , found part of "asn1c" compiler (here's link http://lionet.info/asn1c/blog/).

i have no problems compiling whole thing, using "configure, make, make install" procedure, seems impossible compile separately.

i'm trying compile ber encoder/decoder functionality of package static library, in netbeans. however, i'm having big problems "include" nonsenses. here's example...

in asn1parser.h file there's typedef of new type called "asn1c_integer_t"

//some preprocessor statements removed keep post short... typedef intmax_t asn1c_integer_t;   #include "asn1p_list.h" #include "asn1p_oid.h"      /* object identifiers (oids) */ #include "asn1p_ref.h"      /* references custom types */ etc... 

however, of these files included in previous file (asn1p_oid.h, example) using new data type defined in previous file.

#ifndef asn1_parser_oid_h #define asn1_parser_oid_h  typedef struct asn1p_oid_arc_s {     asn1c_integer_t number; /* -1 if not yet defined */     char *name; /* 0 if not defined */ } asn1p_oid_arc_t; etc... 

it makes no sense me, , keep getting errors like:

asn1parser.h:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘asn1c_integer_t’

can me solve issue?

have tried #include "asn1parser.h" in "some of these files"? maybe included form elsewhere, , @ point, name asn1c_integer_t unknown compiler.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -