Question
Problem using sprintf
Posted on August 08, 2014 at 11:41
Hi community,
I am having trouble using the sprintf function to convert a variable into a string. It compiles just fine if I dochar string[11];
sprintf(string, ''23''); And I can see the numer 23 in ''string'' while debugging.
But just using a variable instead of the number, like
int data = 23;
sprintf(string, data);
throws these errors:
undefined reference to `__HEAP_END' SPC563Mxx OS-Less Test Application line 37, external location: \data\distribution\free-entry-toolchain-v4.6.2.1\gcc-4.6.x\libhtcos\ppc-vle\libos_sbrk.c C/C++ Problem
undefined reference to `__HEAP' SPC563Mxx OS-Less Test Application line 0, external location: c:\spc5studio\eclipse\plugins\com.st.tools.spc5.tools.hightec_1.0.0.201306281422\hightec\ppc-ht-eabi\lib\vle\libos.a(libos_sbrk.o) C/C++ Problem
undefined reference to `__HEAP' SPC563Mxx OS-Less Test Application line 42, external location: \data\distribution\free-entry-toolchain-v4.6.2.1\gcc-4.6.x\libhtcos\ppc-vle\libos_sbrk.c C/C++ Problem
I would suspect some compiler/linker issues. Does anybody have any ideas?
Best regards
Henrik
#babycare.com