Have not used PropGCC for awhile?
Rsadeika
Posts: 3,837
I have the latest SimpleIDE RC 2 for Windows installed. Below I was just testing out the simple itoa() function, and the program does not compile, what the heck is going on with the latest version of SimpleIDE. I double checked to make sure I was using itoa() correctly, which I am, but the error is telling me that it cannot find itoa()?
If this is not just a simple error on my part, and there were changes made to the way SimpleIDE works, I would think that Parallax would be nice enough to at least give a slight indication that there are major changes to be expected to the way SimpleIDE will work. To take it one step further, if Parallax is dumping SimpleIDE, please let us know, so we can make other arrangements. Thank you for your consideration.
Ray
If this is not just a simple error on my part, and there were changes made to the way SimpleIDE works, I would think that Parallax would be nice enough to at least give a slight indication that there are major changes to be expected to the way SimpleIDE will work. To take it one step further, if Parallax is dumping SimpleIDE, please let us know, so we can make other arrangements. Thank you for your consideration.
Ray
/* test2.c http://learn.parallax.com/propeller-c-tutorials */ #include <stdio.h> #include <stdlib.h> int main() // Main function { // Add startup code here. int first; char second[6]; first =13076; itoa(first,second,10); printf("?%s",second); while(1) { // Add main loop code here. } }
Project Directory: /programming/PropGCC/test2/
SimpleIDE Version 1.0.2
C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/
C:/Users/ray/Documents/SimpleIDE/ Updated on: 2015-06-13
propeller-elf-gcc.exe -v GCC 4.6.1 (propellergcc_v1_0_0_2408)
propeller-elf-gcc.exe -I . -L . -o cmm/test2.elf -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 test2.c -lm
test2.c: In function 'main':
test2.c:16:3: warning: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
C:\Users\ray\AppData\Local\Temp\ccC8ebpW.o: In function `_main':
(.text+0xe): undefined reference to `_itoa'
collect2: ld returned 1 exit status
Done. Build Failed!
Check source for bad function call or global variable name `_itoa'
Comments
Instead of itoa you could use sprintf:
A couple of years back, I remember using itoa and atoi, with a program that I was working on, yes it was SimpleIDE, and the functions were there, which worked. So, it seems to me somebody is cleaning house, and not letting anybody know about what has been removed. Now I am wondering what else is missing, or is this to be the "New Adventures with SimpleIDE" time?
Ray
Ray
As far as what functions should be supported, all of the ones in the C standard are. If you look online at e.g, www.cplusplus.com for a function, and see whether it is standard or not, that will pretty much tell you whether it should be in the library. itoa() is marked as non-standard, and googling it leads one to find that it's not present in Linux (for example).
Using the program below with sprintf(), you get a Code size 13,824, with the substantial general code overhead, every little byte saved helps. I am assuming that both of these versions are accomplishing the same thing?
Yes I do use cplusplus a lot, as a reference, the little examples that are included with the function explanation is very useful.
Ray