Using strtok_r in MCUXpresso

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

Using strtok_r in MCUXpresso

1,455 Views
biafra
Senior Contributor I

Hi everyone,

I'm using MCUXpresso 10.1.1, I need to use the strotok_r function in my code, I include string.h header file, but I get the following error/warning:

warning: implicit declaration of function 'strtok_r' [-Wimplicit-function-declaration]

error: undefined reference to `strtok_r'

Which steps must I follow? Is there any reference to use this function in MCUXpresso?

Many thanks

Biafra

2 Replies

1,192 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Try using strtok() instead. Otherwise if you really need strtok_r(), then try using Newlib rather than the default Redlib C library. For more background information on C library support in MCUXpresso IDE, see the MCUXpresso IDE v10.1 User Guide, chapter 13, "C/C++ Library Support".

Regards,

MCUXpresso IDE Support

1,192 Views
biafra
Senior Contributor I

I will try your suggestion.

Many thanks

Biafra