我需要asn1 BER编码器/解码器,并发现它是“asn1c”编译器的一部分(这里是http://lionet.info/asn1c/blog/链接)。
我使用“配置,制作,安装”过程编译整个程序没有问题,但似乎无法单独编译。
我正在尝试将此包的BER编码器/解码器功能编译为NetBeans中的静态库。但是,我遇到一些“包含”废话的大问题。这是一个例子
在asn1parser.h文件中,有一个新类型的typedef,称为“asn1c_integer_t”
//some preprocessor statements removed to keep this post short...
typedef intmax_t asn1c_integer_t;
#include "asn1p_list.h"
#include "asn1p_oid.h" /* Object identifiers (OIDs) */
#include "asn1p_ref.h" /* References to custom types */
etc...
#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...
asn1parser.h:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘asn1c_integer_t’
最佳答案
您是否曾在“其中一些文件”中尝试过#include "asn1parser.h"
?也许它们也包含在其他地方,到那时,名称asn1c_integer_t
对编译器是未知的。
https://stackoverflow.com/questions/5039780/