The CMake file generation stage completes successfully:
# cmake .. -G "MSYS Makefiles" -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe
-- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/msys64/home/admin/APE/build
However, building fails with an error from GCC:
# make
Scanning dependencies of target APE
[ 9%] Building C object CMakeFiles/APE.dir/clock.c.obj
[ 18%] Building C object CMakeFiles/APE.dir/engine.c.obj
[ 27%] Building C object CMakeFiles/APE.dir/eval.c.obj
[ 36%] Building C object CMakeFiles/APE.dir/main.c.obj
C:/msys64/home/admin/APE/main.c: In function 'main':
C:/msys64/home/admin/APE/main.c:72:17: warning: implicit declaration of function 'launch_gui' [-Wimplicit-function-declaration]
launch_gui();
^~~~~~~~~~
C:/msys64/home/admin/APE/main.c:84:28: error: 'win32' undeclared (first use in this function)
if (engine_mode == win32)
^~~~~
C:/msys64/home/admin/APE/main.c:84:28: note: each undeclared identifier is reported only once for each function it appears in
C:/msys64/home/admin/APE/main.c:86:21: warning: implicit declaration of function 'gui_get_message' [-Wimplicit-function-declaration]
while (!gui_get_message(cmd) || !*cmd)
^~~~~~~~~~~~~~~
C:/msys64/home/admin/APE/main.c:122:13: warning: implicit declaration of function 'gui_update' [-Wimplicit-function-declaration]
gui_update(NULL);
^~~~~~~~~~
C:/msys64/home/admin/APE/main.c:123:13: warning: implicit declaration of function 'gui_send_message' [-Wimplicit-function-declaration]
gui_send_message("ok");
^~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/APE.dir/build.make:102: CMakeFiles/APE.dir/main.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/APE.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
The CMake file generation stage completes successfully:
However, building fails with an error from GCC: