ARM compiler, how do i link with standard library?


#1

I switched from GCC to ARM compiler, and got following messages from the linker:

 arm_gpsgprs_0_0_1_B_err_lnk.tmp : 3237 : Error: L6218E: Undefined symbol strncpy (referred from update.o).
 arm_gpsgprs_0_0_1_B_err_lnk.tmp : 3238 : Error: L6218E: Undefined symbol strstr (referred from update.o).
 arm_gpsgprs_0_0_1_B_err_lnk.tmp : 3238 : Error: L6218E: Undefined symbol strstr (referred from update.o).

The function the linker is complaining about are in the ISO standard and arm compiler docs(ADS_CompilerGuide_D.pdf) state that they are in the library included with the compiler. But I can’t find how to link with the library.


#2

I don’t know why they aren’t linked in, but each function is < 6 lines long to write, so if you want it to just work, the simplest approach is to rewrite them in an #ifdef.


#3

Did you re-run the Project Wizard to update your project for this change?

Might be worth starting afresh from an empty ADS-based project, then adding your sources into that…?


#4

I was thinkin about it. There are a lot of functions to write and some functions like snprintf are not so eazy to implement.


#5

Thats what I did. No luck.