Build Error
Nyxie98 opened this issue · 1 comments
Nyxie98 commented
I've spent a while trying to get the CMake to work, but every time I run the given command, I get this error:
CMake Error at CMakeLists.txt:2 (project):
Running
'nmake' '-?'
failed with:
The system cannot find the file specified
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
tehKaiN commented
Hi,
I assume you are building on Windows, right? Are you using Bebbo's compiler, or the Bartman's vscode extension?
CMake works by generating build commands for various build systems. On Windows, it defaults to Microsoft's NMake, but we need it to use GNU Make. Try the following:
- remove all the files in CMake's temporary directory so that we'll be sure it won't use cached values
- configure it again:
mkdir build && cd build
cmake .. -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=/path/to/AmigaCMakeCrossToolchains/m68k.cmake -DM68K_TOOLCHAIN_PATH=/path/to/toolchain -DM68K_CPU=68000 -DM68K_FPU=soft
The -G "MinGW Makefiles"
is something I've missed in the docs. Sorry for that! If you're using msys2/cygwin instead of plain cmd, you may need to specify -G"Unix Makefiles"
instead.
Let me know if this helps