Hello everyone,
I just got started on developing my first PSP programs a couple of days ago after I got the PSP toolchain installed on Linux. I was able to get Hello World working and I modified the code to do some cool stuff. Also, thanks to this forum - and searching through it - I have learned lots. I'm an intermediate C programmer although I haven't programmed in a long time, but the PSP seems to have started a new hobby. ;-)
Anyways, I have encountered a few problems along the way in writing a new program. One of them is, I can't even access string functions like strcpy and strdup, as well as sprintf. I had read that someone had suggested using the CSD Development Library to accomplish this... but has anyone tried it? And also, how would I compile the libraries in Linux with the latest PSP toolchain? I have never added libraries to a compiler in Linux. The instructions in the text file are in some other language, and the makefile refers to another compiler.
If you have any suggestions on how to get these common C functions working for the PSP, please let me know. I apologize if I overlooked something obvious.
Thanks!
Adding custom libraries (newbie)
mrbrown wrote:Just link with libc which is included in the psptoolchain.
Pass -lc on the linker command line.
I tried that last night as well. I'm at work so I don't have access to my home PC right now, but I had added the -lc in the PSP LD command. Do I have to put it in the right order in that particular command line?
No need to get upset over it. I searched this forum for libc/string functions last night and didn't see that information, and I don't have as much time on my hands to read every single post. I was hoping this information would be on a sticky, as it seems like an obvious question for people getting into this environment. Just a suggestion.mrbrown wrote:Use psp-gcc to link instead of psp-ld. Order matters. Search this very forum because I think this is like the umpteenth time I've repeated this information :P.
Thanks for the help though.