KDS can't find my library...

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KDS can't find my library...

Jump to solution
2,397 Views
georgschmidt
Contributor III

I successfully compiled a library in KDS, that was originally written in CodeWarrior.

Now I wanted to create a test-project that uses this library.

I linked the library in the "Paths and Symbols" section of the C/C++ General settings (as a workspace path - the library is still in my workspace).

But when I try to compile the project I get an error that the linker can not find the library:

 

c:/freescale/kds_1.1.1/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lD:/Freescale_Projects/Freescale_Firmware/MK60_Lib/Debug/MK60.a

 

The path given here is definitively correct and the file exists.

 

What can I try?

 

Regards,

Georg

Labels (1)
1 Solution
905 Views
BlackNight
NXP Employee
NXP Employee
0 Kudos
3 Replies
906 Views
BlackNight
NXP Employee
NXP Employee

See Creating and using Libraries with ARM gcc and Eclipse | MCU on Eclipse

especially http://mcuoneclipse.files.wordpress.com/2013/02/gcc-linker-options-for-the-library.png

You need to specify the libarary name with the -I option (without the lib prefix and the .a extension).

0 Kudos
905 Views
georgschmidt
Contributor III

Thanks a lot, that worked!

But who the hell invents such a strange notation? :smileyconfused:

0 Kudos
905 Views
BlackNight
NXP Employee
NXP Employee

unfortunately, this is how the GNU linker expect things, and how the GNU linker options are defined.

I believe somehow they thought that this might shorten the command line length. I agree, it is not intuitive at all.

Reference:

https://gcc.gnu.org/onlinedocs/gcc-3.3.6/gcc/Link-Options.html

0 Kudos