Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

3.8.2. Using the Library

To use the library in a Nios® II application project, perform the following steps:
  1. Create your Nios® II application project.
  2. To set the library path in the application project, right-click the project, and click Properties.
  3. Expand Nios® II Application Properties. In Nios® II Application Paths, next to Application include directories, click Add and browse to the directory containing your library header files.
  4. Next to Application library directories, click Add and browse to the directory containing your .a file.
  5. Next to Library name, click Add and type the library project name you selected when you created your user library.
  6. Click OK.
  7. Build your application.

As this example shows, the .c source files are not required to build the application project. To hand off the library to another engineer or organization for reuse, you provide the following files:

  • Nios® II library archive file (.a)
  • Software header files (.h)