meakcey
meakcey

Reputation: 83

Integrating CMake to Qt Project

I am trying to integrate simple project in QT with CMake. There is so many problem and solution proposals but none of them solved the problem. I've just crated a simple QT Widget application and prepared CMakeLists.txt. When I open it with Qt creator, I am getting the errors below

"The CMAKE_C_COMPILER: cl is not a full path and was not found in the PATH. To use the JOM generator with Visual C++, cmake must be run from a shell that can use the compiler cl from the command line. This environment is unable to invoke the cl compiler. To fix this problem, run cmake from the Visual Studio Command Prompt (vcvarsall.bat). Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH."

"The C++ compiler "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/Users/xx/AppData/Local/Temp/QtCreator-pcEtcD/qtc-cmake-MWKmhCFk/CMakeFiles/CMakeTmp Run Build Command:"jom" "/NOLOGO" "cmTC_7c235\fast" The system cannot find the file specified Generator: execution of make failed. Make command was: "jom" "/NOLOGO" "cmTC_7c235\fast"

I got nothing from these errors

Upvotes: 0

Views: 1078

Answers (2)

tsragravorogh
tsragravorogh

Reputation: 3153

Make sure that jom.exe is in your path. I had the same problem and solved it by adding the path to jom.exe.

Upvotes: 2

Th. Thielemann
Th. Thielemann

Reputation: 2825

Run the commands from the Visual Studio Command Prompt. Should be most top entry of the Start menu (in Windows 7).

Upvotes: 1

Related Questions