I followed the wiki instructions to install the Wii/PPC flavor of devkitpro into my existing MSYS2 environment.
I was able to get the triangle.c Wii example program to build in an MSYS2 terminal using the /opt/devkitpro/cmake/Wii.cmake toolchain file.
I then tried creating a CMakePresets.json:
Code: Select all
{
"version": 10,
"cmakeMinimumRequired": {
"major": 3,
"minor": 31,
"patch": 4
},
"configurePresets": [
{
"name": "default1",
"displayName": "Default Config (Win)",
"description": "Default build using Windows paths",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build/default",
"toolchainFile": "C:/msys64/opt/devkitpro/cmake/Wii.cmake",
"environment": {
"DEVKITPRO": "C:/msys64/opt/devkitpro",
"DEVKITARM": "C:/msys64/opt/devkitpro/devkitARM",
"DEVKITPPC": "C:/msys64/opt/devkitpro/devkitPPC",
"PATH": "C:/msys64/opt/devkitpro/tools/bin:$penv{PATH}"
}
},
{
"name": "default2",
"displayName": "Default Config (MSYS2)",
"description": "Default build using MSYS2 paths",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build/default",
"toolchainFile": "/opt/devkitpro/cmake/Wii.cmake",
"environment": {
"DEVKITPRO": "/opt/devkitpro",
"DEVKITARM": "/opt/devkitpro/devkitARM",
"DEVKITPPC": "/opt/devkitpro/devkitPPC",
"PATH": "/opt/devkitpro/tools/bin:$penv{PATH}"
}
}
],
"buildPresets": [
{
"name": "default",
"configurePreset": "default1"
}
]
}
I get different errors when clean reconfiguring in vscode with each preset.
default1:
Code: Select all
[main] Configuring project: wii
[proc] Executing command: C:\msys64\usr\bin\cmake.EXE -DCMAKE_TOOLCHAIN_FILE=C:/msys64/opt/devkitpro/cmake/Wii.cmake -SC:/msys64/home/bensh/projects/wii -BC:/msys64/home/bensh/projects/wii/build/default -G "Unix Makefiles"
[cmake] --
[cmake] DEVKITARM=C:/msys64/opt/devkitpro/devkitARM
[cmake] DEVKITPPC=C:/msys64/opt/devkitpro/devkitPPC
[cmake] DEVKITPRO=C:/msys64/opt/devkitpro
[cmake] PATH=/opt/devkitpro/tools/bin:C:/msys64/opt/devkitpro/tools/bin:/usr/local/bin:/usr/bin:/usr/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
[cmake]
[cmake] -- CMAKE_C_COMPILER=C:/msys64/opt/devkitpro/devkitPPC/bin/powerpc-eabi-gcc.exe
[cmake] -- CMAKE_CXX_COMPILER=C:/msys64/opt/devkitpro/devkitPPC/bin/powerpc-eabi-g++.exe
[cmake] -- The C compiler identification is unknown
[cmake] -- The CXX compiler identification is unknown
[cmake] CMake Error at CMakeLists.txt:8 (project):
[cmake] The CMAKE_C_COMPILER:
[cmake]
[cmake] C
[cmake]
[cmake] is not a full path and was not found in the PATH.
[cmake]
[cmake] Tell CMake where to find the compiler by setting either the environment
[cmake] variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
[cmake] the compiler, or to the compiler name if it is in the PATH.
[cmake]
[cmake]
[cmake] CMake Error at CMakeLists.txt:8 (project):
[cmake] The CMAKE_CXX_COMPILER:
[cmake]
[cmake] C
[cmake]
[cmake] is not a full path and was not found in the PATH.
[cmake]
[cmake] Tell CMake where to find the compiler by setting either the environment
[cmake] variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
[cmake] to the compiler, or to the compiler name if it is in the PATH.
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[proc] The command: C:\msys64\usr\bin\cmake.EXE -DCMAKE_TOOLCHAIN_FILE=C:/msys64/opt/devkitpro/cmake/Wii.cmake -SC:/msys64/home/bensh/projects/wii -BC:/msys64/home/bensh/projects/wii/build/default -G "Unix Makefiles" exited with code: 1
default2:
Code: Select all
[main] Configuring project: wii
[proc] Executing command: C:\msys64\usr\bin\cmake.EXE -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Wii.cmake -SC:/msys64/home/bensh/projects/wii -BC:/msys64/home/bensh/projects/wii/build/default -G "Unix Makefiles"
[cmake] --
[cmake] DEVKITARM=/opt/devkitpro/devkitARM
[cmake] DEVKITPPC=/opt/devkitpro/devkitPPC
[cmake] DEVKITPRO=/opt/devkitpro
[cmake] PATH=/opt/devkitpro/tools/bin:C:/msys64/opt/devkitpro/tools/bin:/usr/local/bin:/usr/bin:/usr/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
[cmake]
[cmake] -- CMAKE_C_COMPILER=/opt/devkitpro/devkitPPC/bin/powerpc-eabi-gcc.exe
[cmake] -- CMAKE_CXX_COMPILER=/opt/devkitpro/devkitPPC/bin/powerpc-eabi-g++.exe
[cmake] -- The C compiler identification is unknown
[cmake] -- The CXX compiler identification is unknown
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerABI.cmake:139 (file):
[cmake] file STRINGS file
[cmake] "C:/msys64/home/bensh/projects/wii/C:/msys64/home/bensh/projects/wii/build/default/CMakeFiles/3.31.5/CMakeDetermineCompilerABI_C.bin"
[cmake] cannot be read.
[cmake] Call Stack (most recent call first):
[cmake] /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
[cmake] CMakeLists.txt:8 (project)
[cmake]
[cmake]
[cmake] -- Check for working C compiler: /opt/devkitpro/devkitPPC/bin/powerpc-eabi-gcc.exe - skipped
[cmake] -- Detecting CXX compiler ABI info
[cmake] -- Detecting CXX compiler ABI info - done
[cmake] CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerABI.cmake:139 (file):
[cmake] file STRINGS file
[cmake] "C:/msys64/home/bensh/projects/wii/C:/msys64/home/bensh/projects/wii/build/default/CMakeFiles/3.31.5/CMakeDetermineCompilerABI_CXX.bin"
[cmake] cannot be read.
[cmake] Call Stack (most recent call first):
[cmake] /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
[cmake] CMakeLists.txt:8 (project)
[cmake]
[cmake]
[cmake] -- Check for working CXX compiler: /opt/devkitpro/devkitPPC/bin/powerpc-eabi-g++.exe - skipped
[cmake] -- Configuring incomplete, errors occurred!
[proc] The command: C:\msys64\usr\bin\cmake.EXE -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Wii.cmake -SC:/msys64/home/bensh/projects/wii -BC:/msys64/home/bensh/projects/wii/build/default -G "Unix Makefiles" exited with code: 1
These also poop a weird "C" folder in my workspace folder.
Any ideas? Is it just not possible to get vscode to play nice with devkitpro+MSYS2+CMake?