We received our playdate a while back and I’ve been happily playing with it off and on ever since!
I know C better than I know Lua so I went straight for that. I didn’t have much luck getting anything building in Windows for C including the examples but I did have more success on the Mac, so I swapped over to using Xcode to build and have started making a little game.
I tried to use snprintf to put an integer into a string before displaying it. This gave me a compile error and after a bit of investigating it seems as though there probably just isn’t support for that method?
FYI the error read: undefined reference to `_sbrk’
I’ve searched the forums and it seems like most people are using Lua which has string manipulation built in. Perhaps I should have just gone straight for Lua but I thought I’d be more comfortable in C!
Any help is much appreciated, perhaps there is a more obvious way that I’ve overlooked? Right now I’m thinking that I need to write my own method for stringifying a number?
Oh cool, thanks so much. Yeah, I tested the other string functions worked ok and I could see that it was to do with the fact that function needs to allocate. Also, I read through “Inside Playdate with C” but I guess not thoroughly enough!
Thanks for the additional info Nic!
I had also found that linker option whilst searching but couldn’t work out where I needed to put it. Building with makefiles also not something I’ve spent a lot of time doing, not recently at least!