Leos313
Leos313

Reputation: 5627

Using Shared library in an Eclipse enviroment (SDSoC)

Let's say I have a Shared library libSomething.so and the header file something.h.

The library was cross-compiled and tested (or, better, was directly compiled on the target platform, linked and tested with an example application). Now I want to use this shared library in another huge project where Eclipse cross-compilies all the file and, after, I will send the executable to the target. (It is not possible to compile this projet directly on the target unfortunately).

The purpose is to use the same shared library on SDSoC* (Vivado program based on eclipse). To do this:

-right click on the application -> Properties -> C/C++ Build -> Setting -> Tool Setting -> SDS++ Linker -> Libraries

screenshot of the eclipse enviroment

The console displays cannot find -llibSomething. The complete line is:

/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabihf/6.2.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -llibSomething

Also, I tried to add the folder and the library in C/C++ General -> Code Analysis -> Paths and Symbols -> Libraries and Library Paths. The result is the same.

Also, I have been through the console messages and I verified that the sds++ compiler call is correct:

sds++ -L/path/to/library --remote_ip_cache ......

Even in the Makefile, the instruction is correct. I cannot face the problem. What am I doing wrong?

At the end of the post, the question is:

How to use (and link) a shared library in SDSoC?

the SDSoC is a program develop by xilinx. More informations here. Also I posted a similar question on the xilinx forum with no answer so far.

Upvotes: 0

Views: 547

Answers (1)

Fred Larson
Fred Larson

Reputation: 62063

The linker adds the lib prefix and the file extension, so don't include those in the library list. Use Something instead of libSomething.

Upvotes: 1

Related Questions