Utoa( ) in application.h? [Solved]

I am trying to port the Nextion arduino libs and they are calling utoa like so utoa(number, buf, 10);

I have been doing some research and it appears that utoa is from stdlib.h for arduino but utoa is non-ISO C function. How/where should I define this function? I have application.h included but I am guessing that because it is non-standard it wasn’t included in application.h. Thanks.
stdlib.h reference doc

In the header you can try to use the keyword extern and C to pull the C function prototype

example:

extern "C" char* utoa(int a, char* buffer, unsigned char radix);

and then call the function as you wish

1 Like

That did it! Thanks…

@LukeUSMC did you finish this port and would it be something you could share? I just got 2 of these displays and was thinking I’m going to have to port this lib but it would be nice if I didn’t have to reinvent the wheel. :smile:

Thanks

1 Like