Hmm, I have arm-non-eabi installed now, but when I run 'make' in the VSCode terminal I get the following string of errors.
PS C:\Users\shrin\Documents\Playdate Projects\mini3d-plus\src> make
process_begin: CreateProcess(NULL, uname -s, ...) failed.
C:\Users\shrin\Documents\PlaydateSDK/C_API/buildsupport/common.mk:1: pipe: No error
detected_OS is ""
process_begin: CreateProcess(NULL, which arm-none-eabi-gcc, ...) failed.
C:\Users\shrin\Documents\PlaydateSDK/C_API/buildsupport/common.mk:28: pipe: No error
process_begin: CreateProcess(NULL, which arm-none-eabi-objcopy, ...) failed.
C:\Users\shrin\Documents\PlaydateSDK/C_API/buildsupport/common.mk:34: pipe: No error
OBJDIR is "build"
C:\Users\shrin\Documents\PlaydateSDK/C_API/buildsupport/common.mk:159: *** multiple target patterns. Stop.
I verified that arm-none-eabi-gcc and arm-none-eabi-objcopy are both recognized by the terminal if I enter them on their own. So it's definitely installed and properly referenced in PATH. I can't sus out why these are failing.
The culprit lines in the C_API common.mk makefile:
TRGT = arm-none-eabi-
GCC:=$(dir $(shell which $(TRGT)gcc))
...
OJBCPY:=$(dir $(shell which $(TRGT)objcopy))
(It'sa been a while since I've done any C++ dev environment setup, apologies if any of this has a super obvious solution!)
Thanks for the heads up! I installed mingw32 and tried your instructions. It's failing to run the pre-build test program, says it can't find a file specified, but the only files it references appear to be temporary, and it clears the directory after it's done. Have I configured something incorrectly?
PS C:\Users\shrin\Documents\Playdate Projects\mini3d-plus\src> cmake .. -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/mingw32/bin/gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/mingw32/bin/gcc.exe
-- Check for working C compiler: C:/mingw32/bin/gcc.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.29/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"C:/mingw32/bin/gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: 'C:/Users/shrin/Documents/Playdate Projects/mini3d-plus/src/CMakeFiles/CMakeScratch/TryCompile-kgrwsf'
Run Build Command(s): "C:/Program Files/CMake/bin/cmake.exe" -E env VERBOSE=1 C:/ProgramData/chocolatey/bin/make.exe -f Makefile cmTC_fd6c2/fast
C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -f CMakeFiles/cmTC_fd6c2.dir/build.make CMakeFiles/cmTC_fd6c2.dir/build
make[1]: Entering directory 'C:/Users/shrin/Documents/Playdate Projects/mini3d-plus/src/CMakeFiles/CMakeScratch/TryCompile-kgrwsf'
process_begin: CreateProcess(NULL, sh.exe -c "/C/Program Files/CMake/bin/cmake.exe -E cmake_echo_color --switch= --progress-dir=/C/Users/shrin/Documents/Playdate Projects/mini3d-plus/src/CMakeFiles/CMakeScratch/TryCompile-kgrwsf/CMakeFiles --progress-num=1 Building C object CMakeFiles/cmTC_fd6c2.dir/testCCompiler.c.obj", ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: *** [CMakeFiles/cmTC_fd6c2.dir/build.make:77: CMakeFiles/cmTC_fd6c2.dir/testCCompiler.c.obj] Error 2
make[1]: Leaving directory 'C:/Users/shrin/Documents/Playdate Projects/mini3d-plus/src/CMakeFiles/CMakeScratch/TryCompile-kgrwsf'
make: *** [Makefile:127: cmTC_fd6c2/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:31 (project)
-- Configuring incomplete, errors occurred!
I wasn't able to run PLAYDATE_SDK_PATH="" to set that from a Powershell terminal or command prompt. (Thinks it's a command and can't find the reference.)
I tried putting your whole snippet in a build.sh file, but get no output when I run it.
Trying to open bash directly just gets this message
C:\Users\shrin\Documents\Playdate Projects\mini3d-plus\src>bash
<3>WSL (11) ERROR: CreateProcessEntryCommon:502: execvpe /bin/bash failed 2
<3>WSL (11) ERROR: CreateProcessEntryCommon:505: Create process not expected to return
I'm not sure why tf I'm having this many issues, I haven't tried to set it up for C development before.
Edit: Update, I tried opening the solution file for this project (mini3dplus) in Visual studio, and the build output is identical. So it's probably not related to any bash issues.
I solved my issues by downloading and building another project, someone's C API "Hello World" template. This tells me that the issue was probably with the Makefile configuration I was using. I'll submit feedback to the mini3d-plus project that they should include a valid CMakeLists.txt file for Windows users, but otherwise I'm unblocked.