Howdy all,
I'm writing a series of tutorials for setting up new computers for Playdate development and am running into an issue trying to build the C examples using the standalone Build Tools for Visual Studio 2022.
It makes sense that the standard operating procedure is to simply download/install the entire VS 2022 IDE, but I'm trying to cover some alternative options for the sake of thoroughness.
The Inside Playdate for C page has the instructions for building examples using VS Code and NMake (Inside Playdate with C), but assumes the user has the Developer Command Prompt, which is not included with the standard VS Code download.
There are two ways to get it -- download VS 2022 or the Build Tools for VS 2022.
The problem is the standalone Build Tools seem to be set to 32-bit by default. On Windows, they even install under Program Files (x86).
When following the steps laid out in the SDK documentation (create build folder, cmake .. -G "NMake Makefiles", nmake), it does successfully build a .pdx in the example's root directory, but attempting to load it into the Simulator returns the following error:
14:30:29: SDK: P:\PlaydateSDK
14:30:29: Release: 2.5.0
14:30:29: Loading: P:\PlaydateSDK\C_API\Examples\Hello World\hello_world.pdx
Loading C API game: P:/PlaydateSDK/C_API/Examples/Hello World/hello_world.pdx/pdex.dll
LoadLibraryA() failed: (193): P:/PlaydateSDK/C_API/Examples/Hello World/hello_world.pdx/pdex.dll
14:30:29: Loading: OK
Update error: Library architecture mismatch. Try rebuilding with the 64 bit toolset.
14:30:29: Update failed, simulator paused.
I've also tried to build using some of the other prompts included with the Build Tools (like x64 Native) to force it to 64-bit. They all generate a .pdx and they all fail to open in the Simulator with the same error.
Curious if anyone can lend some insight as to what's going on here and any potential solutions (other than the obvious... just use Visual Studio 2022).
Thanks!