Home > Support > ASN1C Tutorial

ASN1C Tutorial

Visual Studio Projects

ASN1C comes complete with several samples, each of which includes a Visual Studio project file compatible with Visual Studio 6.0. (These project files may be imported into newer versions of Visual Studio.) ASN1C versions 6.0 and above also include options to generate project files.

This tutorial describes creating a project file for the Employee sample program found in ASN1C_INSTALL_DIR\cpp\sample_ber\employee. On typical Windows installations, ASN1C_INSTALL_DIR is c:\acv[version], where [version] corresponds to the three digit version number, such as 585.

Please note: projects imported into Visual Studio .NET 2005 may compile with several warnings because of deprecated functions. Newer versions of ASN1C generate code that will not cause these warnings.

Following are instructions for using the enclosed project files.

  1. Before working with the project, the source code for it must be generated, either using the command-line tool or the graphical user interface. Click here for instructions for using the GUI.
  2. Open Microsoft Visual C++.
  3. From the File menu, choose Open Workspace.
  4. Open the file employee.dsw.
  5. reader and writer classes classes should be visible in the project workspace. If you are unable to see the Project workspace, click on the View menu, and select the Workspace option.
  6. From the workspace window, right click on the writer class and select Set As Active Project.
  7. Select Build writer.exe from the Build menu. This action will compile the writer executable.
  8. From the Build menu, select the Execute writer.exe option. An MS-DOS prompt window will open, and you will see the contents of the execution. Close this window by pressing any key.
  9. Repeat this process for the reader project.