when link newlib, there are an link error 'undefined reference to 'strnicmp''

Asked by XuXiaodong

Hi,
I use the new version(7.2.1) arm-none-eabi-gcc for my project, but I occur a problem, undefined reference to 'strnicmp' when linking, but I use 4.8.2 version is OK.

Have somebody met the issue same? Can you please provide me with any ideas on solving this issue?

Thanks very much!

best regards,
HaleyXu

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Tejas Belagod
Solved:
Last query:
Last reply:
Revision history for this message
Best Tejas Belagod (belagod-tejas) said :
#1

Hi,

AFAICS, strnicmp isn't a C99 function. Try using strncasecmp() instead (though that isn't a C99 std string function either, and therefore is open to change).

Thanks,
Tejas.

Revision history for this message
XuXiaodong (haleyxu) said :
#2

Hi,

Thanks for your reply!

 Well, using strncasecmp() is OK! I wonder that why 4.8.4 can use the API?

Revision history for this message
XuXiaodong (haleyxu) said :
#3

Thanks Tejas Belagod, that solved my question.