Hi there,
Been experimenting with the PSPSDK, with a view to making some homebrew goodies ...
I wrote a tiny bit of code to test it out, just a main function with a couple of calls to functions from <string.h> and <ctype.h>.
When compiling with psp-gcc, I kept getting linker errors about "undefined reference to _ctype_".
After much headbanging, I realised that if I compile the code with the -O2 compiler switch, it works fine.
As far as I can see, this switch is to do with optimisation. Why would it have this effect?
Apologies if I'm doing something obviously wrong, I'm not really accustomed to this whole unix/toolchain/gnu way of doing things.
Is this a bug (_ctype_)?
PSPSDK does not provide a ctype.h of its own, so you are actually using the newlib ctype.h. However, since you are not _linking_ with newlib, the global ctype table used by the header file will not be available.
The reason it works with optimization is probably that the code which actually uses ctype gets optimized away...
The reason it works with optimization is probably that the code which actually uses ctype gets optimized away...
Flying at a high speed
Having the courage
Getting over crisis
I rescue the people
Having the courage
Getting over crisis
I rescue the people