ASN.1 C Runtime Library User Guide
The ASN.1 C Runtime Library is delivered as a set of low-level primitive C routines for encoding and decoding the base ASN.1 types (BOOLEAN, INTEGER, etc.) and a rich collection of utility functions to operate on application messages. The ASN.1 C Runtime Library is ANSI C compliant, so that it can run on a wide-variety of platforms and processors from mainframes to embedded systems.
Dowdload the ASN.1 C Runtime Library
Click here to download ASN.1 C Runtime Package (library achive and header file) for your target platform.
ASN.1 C Runtime Library User Guide
The ASN.1 C Runtime Library Package is made up of a c runtime library and include header files. Instructions on usage of ASN.1 C Runtime Library:
On Mac OS/Linux/Solaris/HP-UX
For these unix-like platform, we provide ASN.1 C Runtime Library in static library (.a achive).
Follow these simplfy instructions (you may prefer make
):
- Download the package to any desired folder and uncompress the package.
- Copy the library and header file to the same folder as the codes generated by ASN.1 C Compiler.
- Compile the generated codes together with the header files:
$ gcc -c *.c
- Link .o file against the runtime library, for example:
$ gcc -o test *.o -L. -lasnrt
- If no error message, run it:
$ ./test
On Windows
For Windows (Visual Studio) platform, we provide ASN.1 C Runtime Library in static library (.lib achive).
Follow these instructions (as an example):
- Download the package to any desired folder and uncompress the package.
- Create a new Console Application in Visual Studio, add the codes generated by ASN.1 C Compiler.
- To use the ASN.1 C Runtime Library, you must reference it. To do this, select References… from the Project menu. From the Property Pages dialog, expand the Common Properties node and select References. Then select the Add New Reference… button.
-
The Add Reference dialog is displayed. This dialog lists all the libraries that you can reference. The Project tab lists all the projects in the current solution and any libraries they contain. From the Projects tab, select asnrt.lib. Then select OK.
-
To reference the header files of the static library, you must modify the include directories path. To do this, from the Property Pages dialog, expand the Configuration Properties node, then the C/C++ node, and select General. Next to Additional Include Directories, type in the path to the location of the asnrt.h header file.
-
You can now use the ASN.1 C Runtime in this application, write any code that drive the codes generated by ASN.1 C Compiler.
-
Build the executable by selecting Build Solution from the Build menu.
-
To run the project, select Start Without Debugging from the Debug menu.