[CPP] Guide: C++ on Playdate

I'm going to try this solution: Updating ARM toolchain - #3 by ziziman


Ultimately, i had to install the latest ARM toolchain and then elected to the symlinks in /usr/local/bin:

#MacOS
sudo ln -sf /Applications/ARM/bin/* /usr/local/bin

Then dealt with a undefined reference to '_gettimeofday' error by having to define it (incorrectly). The code now compiles, runs, albeit incorrectly as I don't have the

#include <sys/time.h>
// This function is called once upon boot up of the game and not through the gameplay. 
// Returning 0 seems to be fine ¯\_(ツ)_/¯ 
extern "C" int _gettimeofday( struct timeval *tv, void *tzvp ) {
  return 0; 
} 
1 Like