cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
xdtech
Visitor
Visitor
2,708 Views
Registered: ‎01-30-2018

SDK:ld.exe cannot find a lib file

hi community,

I am a freshman in the Xilinx Forum,and got a trouble when using the SDK ,please give me some advice.

I want to test the HDMI interface of the KC705,and use the ADV7511 Design Demo (https://wiki.analog.com/resources/fpga/xilinx/kc705/adv7511)

 

One of the steps is to specify the location of the library,and then I got stuck in there.

 

In SDK, I want to add a lib file for the project,the method is change the value in project->properties->settings->'library search path' and 'library' parameter.But the build system strangely told me it cannot find the file.

 

problem 1:

the library file ADV7511 provided is a compressed file with the '.a' suffix, Is it a right library pattern? Should I uncompressed the file before I specify the path?(when I uncompress the file ,a lot of .o files contained in the folder)

 

problem2:

There does exist the target file in the location,why the script 'ld.exe' couldn't recognize it?

 

My Env:

win10  +  vivado 2016.4 + SDK 2016.4 + KC705 + HDMI

 

Any ideas from you will be appreciated!

Tags (2)
error.PNG
lib_file_compressed.PNG
settings.PNG
uncompressed folder.PNG
0 Kudos
Reply
4 Replies
ibaie
Xilinx Employee
Xilinx Employee
2,671 Views
Registered: ‎10-06-2016

Hi @xdtech

 

Welcome to the forum :)

 

  1. No you don't need to uncrompress the library, static libraries are handled (.a) are handled properly by the toolchain.
  2.  I'm wondering if the path of library location is not the right one. Could you provide the following info?
    1. Console output of the compilation to check you search path
    2. Location (path) of the .a file 

Regards,

Ibai

 


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Reply
xdtech
Visitor
Visitor
2,666 Views
Registered: ‎01-30-2018

Thanks for your reply!!

I post my console record (console.txt) as the attached file.

The first picture below shows the location of the console.txt, The second one shows my project directory.

The absolute path of the lib is 

E:\ADV7511_demo\hdmi_test\lib\HDMI_MicroBlazeLib.a

and my workspace of SDK project is 

E:\ADV7511_demo

 

The main description of the error :

 

'Building target: hdmi_test.elf'
'Invoking: MicroBlaze gcc linker'
mb-gcc -L"E:\ADV7511_demo\hdmi_test\lib" -Wl,-T -Wl,../src/lscript.ld -L../../hdmi_test_bsp/sys_mb/lib -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mno-xl-soft-div -mcpu=v10.0 -mno-xl-soft-mul -mxl-multiply-high -Wl,--no-relax -o "hdmi_test.elf" ./src/cf_hdmi.o ./src/main.o ./src/transmitter.o -lHDMI_MicroBlazeLib -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
d:/vivadotemp/sdk/2016.4/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/5.2.0/../../../../microblaze-xilinx-elf/bin/ld.exe: cannot find -lHDMI_MicroBlazeLib
collect2.exe: error: ld returned 1 exit status

屏幕快照 2018-02-02 下午9.38.35.png
path.png
0 Kudos
Reply
ibaie
Xilinx Employee
Xilinx Employee
2,660 Views
Registered: ‎10-06-2016

Hi @xdtech

 

It's seems bit strange, I mean, the search path in the settings looks fine as far as the library is located there (from the workspace image seems too).

 

I will suggest you to test changing the location of the library to different folder (i.e. C:\) and test if that works. Also check the usage of / and \.

 

PD: If you share the HDF file and the .a library we could test if it does not work for you.

 

Regards

Ibai


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Reply
ericv
Scholar
Scholar
2,640 Views
Registered: ‎04-13-2015

@xdtech

 

try this:

rename your library to start with "lib"; in your case libHDMI_MicroBlazeLib.a.

I believe the linker expects all library names to start by lib.

e.g. when linking with the math library (the file is named libm.a), -lm is specified on the command line and not -llibm

 

Regards