Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

Using Library

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

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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...
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

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