Tips on what to include in your question:
- Windows 11 C_API/Examples/Hello World no longer compiles
- Windows 11
- I have closely followed the setup instructions for building the program for the Playdate device using NMake described here: Inside Playdate with C including setting the user environment variables
PLAYDATE_SDK_PATH=C:\Users\robert\Documents\PlaydateSDK
PATH=$PATH:C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.3 rel1\bin:C:\Program Files\CMake\bin:%USERPROFILE%\Documents\PlaydateSDK\bin
I was able to build once, and deploy both to the Playdate Simulator, and also directly to the Playdate Device. However, upon cleaning and rebuilding, the executable is no longer properly generated. It seems to be missing from the hello_world.pdx directory. When I try loading in the Simulator once more, it says "Loading Failed" with options "Retry", "Launcher" and "Cancel".
4. I've tried uninstalling, deleting and reinstalling the Playdate SDK (v2.0.3). I've also tried setting up the project again from scratch by restoring it to the original state. I don't receive a compiler error. I'll include the attached log output for the "cmake .. -G..." step and the "nmake" step.
dir env:
...
PLAYDATE_SDK_PATH C:\Users\robert\Documents\PlaydateSDK
PATH C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.3 rel1\bin;C:\Users\robert\Documents\PlaydateSDK\bin;C:\Program Files\CMake\bin;...
mkdir build
cd build
cmake .. -G "NMake Makefiles" --toolchain=C:/Users/robert/Documents/PlaydateSDK/C_API/buildsupport/arm.cmake
-- arm.cmake loaded
-- arm.cmake loaded
-- The C compiler identification is GNU 12.3.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/12.3 rel1/bin/arm-none-eabi-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/12.3 rel1/bin/arm-none-eabi-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- SDK Path: C:/Users/robert/Documents/PlaydateSDK
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: C:/Users/robert/Documents/PlaydateSDK/C_API/Examples/Hello World/build
nmake
Microsoft (R) Program Maintenance Utility Version 14.37.32824.0
Copyright (C) Microsoft Corporation. All rights reserved.
"C:\Program Files\CMake\bin\cmake.exe" -S"C:\Users\robert\Documents\PlaydateSDK\C_API\Examples\Hello World" -B"C:\Users\robert\Documents\PlaydateSDK\C_API\Examples\Hello World\build" --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_progress_start "C:\Users\robert\Documents\PlaydateSDK\C_API\Examples\Hello World\build\CMakeFiles" "C:\Users\robert\Documents\PlaydateSDK\C_API\Examples\Hello World\build\CMakeFiles\progress.marks"
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x86\nmake.exe" -f CMakeFiles\Makefile2 /nologo - all
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x86\nmake.exe" -f CMakeFiles\hello_world_DEVICE.dir\build.make /nologo -L CMakeFiles\hello_world_DEVICE.dir\depend
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_depends "NMake Makefiles" "C:\Users\robert\Documents\PlaydateSDK\C_API\Examples\Hello World" "C:\Users\robert\Documents\PlaydateSDK\C_API\Examples\Hello World" "C:\Users\robert\Documents\PlaydateSDK\C_API\Examples\Hello World\build" "C:\Users\robert\Documents\PlaydateSDK\C_API\Examples\Hello World\build" "C:\Users\robert\Documents\PlaydateSDK\C_API\Examples\Hello World\build\CMakeFiles\hello_world_DEVICE.dir\DependInfo.cmake" "--color="
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x86\nmake.exe" -f CMakeFiles\hello_world_DEVICE.dir\build.make /nologo -L CMakeFiles\hello_world_DEVICE.dir\build
[ 33%] Building C object CMakeFiles/hello_world_DEVICE.dir/src/main.c.obj
C:\PROGRA~2\ARMGNU~1\125863~1.3RE\bin\AR19DD~1.EXE -DTARGET_EXTENSION=1 -DTARGET_PLAYDATE=1 -IC:\Users\robert\Documents\PlaydateSDK\C_API -std=gnu11 -Wall -Wno-unknown-pragmas -Wdouble-promotion -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -D__FPU_USED=1 -falign-functions=16 -fomit-frame-pointer -gdwarf-2 -fverbose-asm -ffunction-sections -fdata-sections -mword-relocations -fno-common -MD -MT CMakeFiles\hello_world_DEVICE.dir\src\main.c.obj -MF CMakeFiles\hello_world_DEVICE.dir\src\main.c.obj.d -o CMakeFiles\hello_world_DEVICE.dir\src\main.c.obj -c "C:\Users\robert\Documents\PlaydateSDK\C_API\Examples\Hello World\src\main.c"
[ 66%] Building C object CMakeFiles/hello_world_DEVICE.dir/C_/Users/robert/Documents/PlaydateSDK/C_API/buildsupport/setup.c.obj
C:\PROGRA~2\ARMGNU~1\125863~1.3RE\bin\AR19DD~1.EXE -DTARGET_EXTENSION=1 -DTARGET_PLAYDATE=1 -IC:\Users\robert\Documents\PlaydateSDK\C_API -std=gnu11 -Wall -Wno-unknown-pragmas -Wdouble-promotion -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -D__FPU_USED=1 -falign-functions=16 -fomit-frame-pointer -gdwarf-2 -fverbose-asm -ffunction-sections -fdata-sections -mword-relocations -fno-common -MD -MT CMakeFiles\hello_world_DEVICE.dir\C_\Users\robert\Documents\PlaydateSDK\C_API\buildsupport\setup.c.obj -MF CMakeFiles\hello_world_DEVICE.dir\C_\Users\robert\Documents\PlaydateSDK\C_API\buildsupport\setup.c.obj.d -o CMakeFiles\hello_world_DEVICE.dir\C_\Users\robert\Documents\PlaydateSDK\C_API\buildsupport\setup.c.obj -c C:\Users\robert\Documents\PlaydateSDK\C_API\buildsupport\setup.c
[100%] Linking C executable hello_world_DEVICE.elf
C:\PROGRA~2\ARMGNU~1\125863~1.3RE\bin\AR19DD~1.EXE -nostartfiles -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -D__FPU_USED=1 -TC:/Users/robert/Documents/PlaydateSDK/C_API/buildsupport/link_map.ld -Wl,-Map=game.map,--cref,--gc-sections,--no-warn-mismatch,--emit-relocs --entry eventHandlerShim "CMakeFiles\hello_world_DEVICE.dir\src\main.c.obj" "CMakeFiles\hello_world_DEVICE.dir\C_\Users\robert\Documents\PlaydateSDK\C_API\buildsupport\setup.c.obj" -o hello_world_DEVICE.elf
c:/progra~2/armgnu~1/125863~1.3re/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: hello_world_DEVICE.elf has a LOAD segment with RWX permissions
echo >nul && "C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.3 rel1\bin\arm-none-eabi-strip.exe" --strip-unneeded -R .comment -g hello_world_DEVICE.elf -o "C:/Users/robert/Documents/PlaydateSDK/C_API/Examples/Hello World/Source/pdex.elf"
cd C:\Users\robert\DOCUME~1\PLAYDA~1\C_API\Examples\HELLOW~1
C:\Users\robert\Documents\PlaydateSDK\bin\pdc -sdkpath C:/Users/robert/Documents/PlaydateSDK Source hello_world.pdx
cd C:\Users\robert\DOCUME~1\PLAYDA~1\C_API\Examples\HELLOW~1\build
[100%] Built target hello_world_DEVICE
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_progress_start "C:\Users\robert\Documents\PlaydateSDK\C_API\Examples\Hello World\build\CMakeFiles" 0
ls ..\hello_world.pdx
Directory: C:\Users\robert\Documents\PlaydateSDK\C_API\Examples\Hello World\hello_world.pdx
Mode LastWriteTime Length Name
-a---- 10/2/2023 2:35 PM 547 pdex.bin
-a---- 10/2/2023 2:35 PM 153 pdxinfo