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# 58295

14.7 SDK - An error occurs when attempting to add a user library to the build

Description

I want to use custom libraries in my application, however, when I add a user library (mylib) to the build under Properties > C/C++General > Paths and Symbols > Libraries, this results in an error similar to the following:

c:/xilinx/sdk/2013.2/gnu/arm/nt/bin/../lib/gcc/arm-xilinx-eabi/4.7.2/../../../../arm-xilinx-eabi/bin/ld.exe: cannot find -l-Wl,--start-group,-lmylib,-lxil,-lgcc,-lc,-lstdc++,--end-group
collect2.exe: error: ld returned 1 exit status
make: *** [app_xil_cpu0.elf] Error 1

How can I fix this problem?

Solution

Adding the library path using the "Add Library" option in "Project Properties -> C/C++ General -> Paths And Symbols -> Libraries" is corrupting the makefile.

Any subsequent changes are effected by this change.

To work around this issue, create a new application and copy the sources from the old application. Then, apply the library settings for the new application by following these steps:

  1. Right-click on the application project.
  2. Go to C/C++ Build -> Settings.
  3. Select "Libraries" section under "Microblaze gcc linker"
  4. Press "Add" button and give the library name.
  5. Optionally, add the "Library Search Path", if your library is in different path.
AR# 58295
Date Created 11/06/2013
Last Updated 11/08/2013
Status Active
Type General Article
Tools
  • EDK - 14.7
  • EDK - 14.6