Building the API

After installation of the ASN1C 3GPP add-on package is complete, a new directory named 'nas_dev' will have been formed under the 'c' subdirectory. This contains all of the development files needed to build the API.

To build on Windows using the default version of Visual Studio for the version of ASN1C where you installed the NAS SDK, the following would be done:

  1. Open the file osys3gpp_a.vcxproj with the Visual Studio IDE. This project file is a Visual Studio 2017 project. Using the IDE retarget the project to the IDE's version if necessary.

  2. Build the project from within the IDE.

That should be all that is necessary. It will cause the ASN1C compiler to be invoked to generate C source code for all of related ASN.1 and CSN.1 specifications. It will then compile the resulting files with Visual Studio C/C++ compiler. Resulting libraries in both debug and release configurations may be found in the debug\lib and release\lib subdirectories respectively.

If you wish to build the API with a different version of Visual Studio instead of the default version, all that needs to be done is moving the nas_dev folder from under the 'c_64' subdirectory to a different 'c_' subdirectory (or 'c' for 32-bit VS 2019). So, for example, if you wanted to build with Visual Studio 2017, you would move the nas_dev folder under c_vs2017 and execute the procedure above. If the version of Visual Studio is newer than Visual Studio 2019, retarget the project file to the newer version.

The 'nmake' command can also be used from a Visual Studio command window to build the API using the provided makefile.

To build on Linux, the procedure is also to use the provided makefile:

  1. From a terminal window, change directory (cd) to the c/nas_dev subdirectory within the installation.

  2. Execute the top-level makefile using the 'make' command: