1

我正在尝试让 SFML2 在 Windows 8 64 位下编译,但似乎 cmake 一直返回此错误:

CMake Error at cmake/Config.cmake:14 (message):
  Unsupported architecture
Call Stack (most recent call first):
  CMakeLists.txt:20 (include)

这是在 Config.cmake 中失败的地方:

if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
    set(WINDOWS 1)

    # detect the architecture (note: this test won't work for cross-compilation)
    include(CheckTypeSize)
    check_type_size(void* SIZEOF_VOID_PTR)
    if("${SIZEOF_VOID_PTR}" STREQUAL "4")
        set(ARCH_32BITS 1)
    elseif("${SIZEOF_VOID_PTR}" STREQUAL "8")
        set(ARCH_64BITS 1)
    else()
        message(FATAL_ERROR "Unsupported architecture")
        return()
    endif()

作为旁注,我使用 MinGW 作为编译器,cmake 中的配置是使用“MinGW MakeFiles”

我不知道为什么很难注意到我的系统架构。任何指针都会非常有帮助!

谢谢^^

4

0 回答 0