# v2x-asn1-code **Repository Path**: sangzeyao/v2x-asn1-code ## Basic Information - **Project Name**: v2x-asn1-code - **Description**: v2x相关asn文件编译成.c文件 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-04-12 - **Last Updated**: 2023-03-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: V2X ## README ### V2X的ASN1代码生成 ``` - GIT下载ASN1C工具https://github.com/vlm/asn1c,然后参考asn1c的install.md进行安装. #可能需要安装的相关依赖 sudo apt-get install libtool sudo apt-get install autoconf sudo apt-get install automake sudo apt-get install libudev-dev #配置 aclocal;libtoolize --force;autoconf;autoheader;automake #编译 autoreconf -iv ./configure make make install - 使用ASN1C将.asn文件生成.c和.h文件 asn1c asn/*.asn -D out/ -gen-autotools -no-gen-example - 如果需要在window平台下使用mingw调试上面的代码,可能会编译错误,需要修改的地方 asn_system.h内需要增加新的头文件 #include 解决ASN相关数据转换的宏问题 asn_random_fill.c使用了random()函数可能未定义,自己实现或修改改函数为常数即可 ```