'utoa' was not declared in this scope

Working libraries, libraries being ported and related hardware
Post Reply
Nutsy
Posts: 241
Joined: Sun Jul 24, 2016 4:26 pm

'utoa' was not declared in this scope

Post by Nutsy » Thu Mar 02, 2017 12:57 pm

So, im still fussing about with this nextion dislpay. I am now trying to use thenextion arduino library, tbh hoping it might fix some of the issues I was having before with values not updating correctly...

Anyway it seems elements of the library use the utoa function. Trouble is its not in the stdlib.h file. And on some googling the only fix i found is to include the stdlib_noniso.h file. Trouble is, there isnt one.

Anyone have code for this function i could quickly add to my project? Or know another fix?

Nutsy
Posts: 241
Joined: Sun Jul 24, 2016 4:26 pm

Re: 'utoa' was not declared in this scope

Post by Nutsy » Thu Mar 02, 2017 1:54 pm

Right, ive found the itoa.h and c files in the core.

So the nextion library is calling this function, but i get the error... Something cant be right there.

Could this be a bug in arduino 1.8.1?

Nutsy
Posts: 241
Joined: Sun Jul 24, 2016 4:26 pm

Re: 'utoa' was not declared in this scope

Post by Nutsy » Thu Mar 02, 2017 2:03 pm

Seems I had to add the include into each and every header file... strange it wouldnt read the include in a parent header such as nextion.h

anyway compiles now... closed?

stevestrong
Posts: 1818
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: 'utoa' was not declared in this scope

Post by stevestrong » Thu Mar 02, 2017 4:01 pm

You could just add the absolute path for the .h file to complier options.

User avatar
Rick Kimball
Posts: 1057
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: 'utoa' was not declared in this scope

Post by Rick Kimball » Thu Mar 02, 2017 4:26 pm

There was a conversation about this before. The arduino proper has applied this change to the SAM core:

https://github.com/arduino/Arduino/pull/4830/files

http://www.stm32duino.com/viewtopic.php ... =30#p18687
-rick

Nutsy
Posts: 241
Joined: Sun Jul 24, 2016 4:26 pm

Re: 'utoa' was not declared in this scope

Post by Nutsy » Mon Mar 06, 2017 10:32 am

Thanks, turned out I did have the library but it wasnt being picked up automatically throught he core build for some reason. Adding the itoa library in ALL the other includes that called it (was in the nextion library) got it working...

Post Reply