Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Using Library

Altera_Forum
Honored Contributor II
1,046 Views

Hi everbody, 

 

i tried to add an Library to my Project. 

But i doesnt works... But why ? 

 

What i do : 

I Add the Libray to the Files. 

 

Then i open the Properties in the Project goto "C/C++ - Build" 

the to the "Linker/Genreal" and Add my Library. 

 

Now Compiling -> Works 

The Linking -> Not Work.:mad:  

 

The Linker says 

 

Linking Test.elf... 

/cygdrive/c/altera/72/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: cannot find -lC:/NIOS2/Test/workspace/Test/lib/lib.a 

collect2: ld returned 1 exit status 

make: *** [Test.elf] Error 1 

Build completed in 216.674 seconds 

 

I hope somebody can help me.... 

 

Thanks everbody. 

 

Tobias 

0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
361 Views

Within your application build properties, you can add the linker data which includes the name of the library and the path. 

 

Hope that will help...
0 Kudos
Altera_Forum
Honored Contributor II
361 Views

The library name should be just the name without any extension. 

The path should be the location where the library.a is located.
0 Kudos
Reply