BoomingTech / Piccolo

Piccolo (formerly Pilot) – mini game engine for games104
MIT License
5.69k stars 1.79k forks source link

win10 cmake错误 #476

Open hanquanjushi opened 6 months ago

hanquanjushi commented 6 months ago

终端输入cmake -S . -B build 之后报错: CMake Error at CMakeLists.txt:3 (project): Running

'nmake' '-?'

failed with:

no such file or directory

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred!

其中,CMakeLists文件是: cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(Piccolo VERSION 0.1.0)

set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(BUILD_SHARED_LIBS OFF)

include(CMakeDependentOption)

---- Include guards ----

if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) message( FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there." ) endif()

set(PICCOLO_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") set(CMAKE_INSTALL_PREFIX "${PICCOLO_ROOT_DIR}/bin") set(BINARY_ROOT_DIR "${CMAKE_INSTALL_PREFIX}/")

add_subdirectory(engine)

cleanwaterylx commented 5 months ago

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage 可能没有指定编译器

hanquanjushi commented 5 months ago

感谢!