Hi,
I'm going through the Inside Playdate With C, I'd like to compile any of the example files. I've ran setup.sh
Documentation
To build with Cmake manually do the following from the root of the project:
mkdir build
cd build
cmake ..
grep: /home/nate/.Playdate/config: No such file or directory
-- SDK Path: ~/Documents/playdate/PlaydateSDK-1.3.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build
So here it's expecting a file called .config
in a hidden folder called Playdate
? I can't find in the docs anything about setting this up. Now, if I run make I get two errors undocumented in the guide?
$ make
/usr/bin/cmake -S"/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World" -B"/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build" --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start "/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build/CMakeFiles" "/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build//CMakeFiles/progress.marks"
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build'
make -f CMakeFiles/hello_world.dir/build.make CMakeFiles/hello_world.dir/depend
make[2]: Entering directory '/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build'
cd "/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build" && /usr/bin/cmake -E cmake_depends "Unix Makefiles" "/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World" "/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World" "/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build" "/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build" "/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build/CMakeFiles/hello_world.dir/DependInfo.cmake" --color=
make[2]: Leaving directory '/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build'
make -f CMakeFiles/hello_world.dir/build.make CMakeFiles/hello_world.dir/build
make[2]: Entering directory '/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build'
[ 50%] Building C object CMakeFiles/hello_world.dir/src/main.c.o
/usr/bin/cc -DTARGET_EXTENSION=1 -DTARGET_SIMULATOR=1 -Dhello_world_EXPORTS -I/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API -fPIC -Wall -Wstrict-prototypes -Wno-unknown-pragmas -std=gnu11 -MD -MT CMakeFiles/hello_world.dir/src/main.c.o -MF CMakeFiles/hello_world.dir/src/main.c.o.d -o CMakeFiles/hello_world.dir/src/main.c.o -c "/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/src/main.c"
[100%] Linking C shared library libhello_world.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/hello_world.dir/link.txt --verbose=1
/usr/bin/cc -fPIC -shared -Wl,-soname,libhello_world.so -o libhello_world.so CMakeFiles/hello_world.dir/src/main.c.o
/usr/bin/cmake -E copy /home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello\ World/build/libhello_world.dylib /home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello\ World/Source/pdex.dylib
Error copying file "/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build/libhello_world.dylib" to "/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/Source/pdex.dylib".
make[2]: *** [CMakeFiles/hello_world.dir/build.make:101: libhello_world.so] Error 1
make[2]: *** Deleting file 'libhello_world.so'
make[2]: Leaving directory '/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build'
make[1]: *** [CMakeFiles/Makefile2:86: CMakeFiles/hello_world.dir/all] Error 2
make[1]: Leaving directory '/home/nate/Documents/playdate/PlaydateSDK-1.3.1/C_API/Examples/Hello World/build'
make: *** [Makefile:94: all] Error 2
Any help would be great I don't use VS Code nor X Code. Ninja is not available for my operating system.