FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5241 Discussions

Is there any example of compiling with a library (.a) file on SoC?

Rink
Novice
1,048 Views

On the windows7 PC, the compiler is: 'Invoking: GCC C Compiler 4 [arm-linux-gnueabihf]'

 

I am trying to use Pth, and I can certainly configure and make it on the de10-nano itself, however the libpth.a file it produces does not work on the windows7 PC build environment. I notice the compiler on the de10-nano itself is: gcc (Linaro GCC 6.2-2016.11) 6.2.1 20161016

 

I thought I could just copy the libpth.a file and link it - but the build environment cannot find file (even though I tell it where it is) - the error may be that the .a file is not ABI compatible?

 

So - the cut this short - an example of building a hello world with a library linkage would be ideal.

0 Kudos
1 Solution
Rink
Novice
180 Views

I found the clue here: https://developer.arm.com/docs/100070/latest/image-structure-and-generation/specifying-user-librarie...

               You can use the

--library=name

 

option to specify static libraries, libname

.a.

So - even though the actual filename is libpth.a - however the build tool only works if I say it is: pth

the tool adds the lib at the front and the .a at the end, and will not countenance the user supplying the full (and valid!) filename!?!?!

good grief.

View solution in original post

3 Replies
Rink
Novice
180 Views

I should note that hello_world compiles fine and targets down onto the de10-nano - but of course it is only a single source file. How to incorporate big lumps of 3rd party code (such as a static library) is what I am missing.

Rink
Novice
180 Views

Wishing I had stayed with Nios2... 😂

Rink
Novice
181 Views

I found the clue here: https://developer.arm.com/docs/100070/latest/image-structure-and-generation/specifying-user-librarie...

               You can use the

--library=name

 

option to specify static libraries, libname

.a.

So - even though the actual filename is libpth.a - however the build tool only works if I say it is: pth

the tool adds the lib at the front and the .a at the end, and will not countenance the user supplying the full (and valid!) filename!?!?!

good grief.

Reply