UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 34664

11 EDK - How can I create library (*.a) files?

Description

How can I create library (*.a) files?

Solution

You can use mb-ar command to generatelibrary files.
The input filesare object files (*.o) and the output filesarelibrary files (*.a).

Hereare the steps to generate the user library:
1Add the "-save-temps"switch in the compiler optionsand re-compile the software application
- In XPS, right click on your software project and select "Set Compiler Options..."
- Bring the "Paths and Options" tab forward
- In the"Other Compiler Options to Append" field, add -save-temps
- Adding the above switch will savethe intermediate files from the compilation (we need the *.o files)
2 Launch the EDK Shell and navigate intothe directory which contains the *.o files.
3 Type the archive command "mb-ar cr libmy_lib.a 01.o 02.o 03.0 "
4Your user library shouldstart with the prefix "lib"
5Add your library in the "Libraries to Link against (-l)" field by adding my_lib. Please note the removal of lib.
AR# 34664
Date Created 03/09/2010
Last Updated 12/15/2012
Status Active
Type General Article
Tools
  • EDK - 11.4