User guide

Nios II IDE Help System
52
2. Reference the Nios II C/C++ library project from your Nios II C/C++ application
project. This step ensures that your Nios II C/C++ library project builds before
your Nios II C/C++ application project. It also ensures you can easily step into the
C/C++ library code when debugging your application project.
a. Click Project References in the left-hand pane.
b. Turn on the Nios II C/C++ library project you want to reference.
3. Set up the linker options so your Nios II C/C++ application project can locate your
library. The C/C++ library is not automatically detected when you reference the
project; you have to explicitly add it.
a. Click C/C++ Build in the left-hand pane.
b. Click the Tool Settings tab.
c. Expand Linker. The General option appears.
d. Click General. The Libraries and Library Paths panes appear.
e. In the Libraries pane, click
Add Library and type the name of the
Nios II C/C++ library project. Do not press the Browse... button.
f. In the Library Paths pane, click
Add Library Path and add the path
to the *.a library file. The library path should include the Debug or
Release folder. Note that you will have to update the library path if you
change the configuration (i.e. Release or Debug) of the Nios II C/C++
library project.
4. Set up the include paths to locate headers from your Nios II C/C++ library project.
If your Nios II C/C++ library project includes header files you would like to access
from your Nios II C/C++ application project, you need to specifically enter the
paths to the header files.
a. On the Tool Settings tab, expand Nios II Compiler. The General
option appears.
b. Click General. The Include Paths pane appears.
c. In the Include Paths pane, click
Add Include Path and add the full
or relative path to the folder containing the header files.
5. Click OK to close the Properties dialog box.
Related Nios II IDE Help Topics
Properties Dialog Box
Associated System Library Page (Properties Dialog Box)
Related Topics on the Web
Nios II literature web page