CMake 윈도우에서 The C compiler identification is unknown 에러

C:\Users\wwforever.NOWCOM\Downloads\MyGUI3.2.0>cmake -G "Visual Studio 7 .NET 2003
"
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Configuring MYGUI 3.2.0
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCIn
formation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Looking for sys/types.h - not found
-- Looking for stdint.h
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCIn
formation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Looking for stdint.h - not found
-- Looking for stddef.h
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCIn
formation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Looking for stddef.h - not found
-- Check size of unsigned short
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCIn
formation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check size of unsigned short - failed
-- Check size of unsigned int
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCIn
formation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check size of unsigned int - failed
-- Check size of unsigned long
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCIn
formation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check size of unsigned long - failed
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/TestBigE
ndian.cmake:44 (message):
  no suitable type found
Call Stack (most recent call first):
  CMakeLists.txt:80 (test_big_endian)


-- Configuring incomplete, errors occurred!


 Windows7에서 VS 2003 빌드를 하던중 위와같이 에러가 발생했습니다. 에러가 길긴 한데 맨 위에 C와 C++ 컴파일러 못 찾는 것만 수정하면 밑에껀 자동으로 수정됩니다. 그리고 꼭 VS 2003에만 해당하는 내용은 아닌 것 같네요. 역시나 꼭 MyGUI 빌드에만 해당하는 것도 아니죠.

 처음에는 CMake가 설치된 곳의 Modules 디렉터리에 있는 CMakeVS7FindMake.cmake 파일을 수정해서 해봤습니다.

#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
#  License text for the above reference.)

find_program(CMAKE_MAKE_PROGRAM
  NAMES devenv
  PATHS
  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VS;EnvironmentDirectory]
  "c:/Program Files/Microsoft Visual Studio .NET/Common7/IDE"
  "c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE"
  "/Program Files/Microsoft Visual Studio .NET/Common7/IDE/"

  "c:/Program Files (x86)/Microsoft Visual Studio .NET 2003/Common7/IDE"
  "/Program Files (x86)/Microsoft Visual Studio .NET 2003/Common7/IDE/"

  )
mark_as_advanced(CMAKE_MAKE_PROGRAM)
set(MSVC70 1)
set(MSVC_VERSION 1300)

 이런 내용인데 위에 bold 처리한 것이 제가 추가한 부분입니다. 제 PC에 설치된 경로는 저렇거든요. 저장하고 다시 빌드해봤지만 여전히 안되더군요.

 그 다음에 찾아본 것이 각 비주얼 스튜디오 버전용 명령 프롬프트로 실행해서 하라고 하더군요. 이건 되더군요. 단, 관리자 모드로 실행해줘야합니다. 그런데 일반 콘솔창도 관리자모드로 해줬더니 그제서야 잘 되더군요. 위에는 그 스샷입니다.

 이걸 떠나 개발할 때는 콘솔모드가 필요하면 왠만하면 관리자 권한으로 하는게 좋은 듯 싶네요. 그나저나 오픈소스?의 길은 멀고도 험난하네요. 이거 해결할려고 시간을 좀 허비했네요. 하지만 다른 에러가 기다리고 있으니...

댓글

이 블로그의 인기 게시물

'xxx.exe' 프로그램을 시작할 수 없습니다. 지정된 파일을 찾을 수 없습니다.

goorm IDE에서 node.js 프로젝트로 Hello World Simple Server 만들어 띄워보기

애드센스 수익을 웨스턴 유니온으로 수표대신 현금으로 지급 받아보자.