• 4973阅读
  • 1回复

[提问]装了MinGW和msys,用QT Creator3.0.1新建C++工程make出错 [复制链接]

上一主题 下一主题
离线wzgo
 

只看楼主 倒序阅读 楼主  发表于: 2014-03-11
RT

MinGW改装的都装了,g++,gcc都有。用的cmake。
配置如下:
debug选择的gdb.exe
编译选择的是g++

新建C++工程,报错如下:

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:G:/Qt/wzg/666-build/CMakeFiles/2.8.11.1/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:G:/Qt/wzg/666-build/CMakeFiles/2.8.11.1/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error at G:/Qt/cmake-2.8.11.1-win32-x86/share/cmake-2.8/Modules/CMakeMinGWFindMake.cmake:20 (message):
  sh.exe was found in your PATH, here:


  C:/MinGW/msys/1.0/bin/sh.exe


  For MinGW make to work correctly sh.exe must NOT be in your path.


  Run cmake from a shell that does not have sh.exe in your PATH.


  If you want to use a UNIX shell, then use MSYS Makefiles.


Call Stack (most recent call first):
  CMakeLists.txt:1 (project)


-- Configuring incomplete, errors occurred!
离线wzgo

只看该作者 1楼 发表于: 2014-03-11
windows的环境变量设置如下:

include、lib、PATH都设置的mingw的安装目录
快速回复
限100 字节
 
上一个 下一个