AmigaPorts / ACE

Amiga C Engine
Mozilla Public License 2.0
155 stars 26 forks source link

Build Error #141

Open Nyxie98 opened 3 years ago

Nyxie98 commented 3 years ago

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 3 years ago

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:

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