I'm trying to build a project with MSVC 2013 and Qt Creator 4.4.0 with JOM and was having issues to configure JOM. So, I tried to erase Qt Creator's configuration files completely and start from scratch.
In the fresh Qt configuration, after I opened the project, I set the CMake (3.9.3) location and ran CMake on the project. Unfortunately, by default, the Qt 5.6.3 Kit seems to choose the NMake generator instead of the NMake JOM generator. After deleting the build directory, I changed the generator to NMake JOM in the Kit configurations, but met the following error message:
CMake Error: Generator: execution of make failed. Make command was: "jom" "/NOLOGO" "cmTC_276f9\fast"
Any idea of why this is happening? As far as I remember, Qt Creator is supposed to build the projects with JOM by default.
I had the same exact problem. Add the location of jom.exe (typically it is path like [...]\Qt5.12.1\Tools\QtCreator\bin\) to your PATH.
Related
I built an extension plugin in release mode with MinGW 32bits (Qt 5.13.1).
When I run qmlplugindump everything works as expected and my .qmltypes file is well generated.
But when I build my plugin in release mode with MinGW 64bits (Qt 5.13.1) the qmlplugindump leads to the following error:
17:10:24: Starting: "C:\Qt\QtFramework\5.13.1\mingw73_64\bin\qmlplugindump.exe" -nonrelocatable NXSharedControllers 1.0 ...\NXSharedControllers > NXSharedControllers\nxsharedcontrollers.qmltypes
QQmlComponent: Component is not ready
file:///C:/Users/Documents/Qt_Main-d_5_13_1_MinGW_64bit/NX_SharedControllers/typelist.qml:3:1: plugin cannot be loaded for module "NXSharedControllers": Cannot load library C:\Users\Documents\Qt_Main-d_5_13_1_MinGW_64bit\NX_SharedControllers\NXSharedControllers\NXSharedControllersPlugin.dll: Unknown error 0x000000c1.
17:10:24: The process "C:\Qt\QtFramework\5.13.1\mingw73_64\bin\qmlplugindump.exe" exited with code 3.
Error while building/deploying project Qt_Main (kit: Desktop Qt 5.13.1 MinGW 64-bit)
When executing step "Custom Process Step"
Does it mean anything to someone ?
I have found the cause of this issue. A dependency file was missing from the plugin build folder. I created a custom target with QMake in order to copy the dependency file to this folder.
Just installed QT and trying to build a QT project from inside the QTcreator using Cmake instead of Qmake.
I get the following error:
Starting to parse CMake project, using: "DCMAKE_BUILD_TYPE:STRING=Debug",
"-DCMAKE_CXX_COMPILER:STRING=",
"-DCMAKE_C_COMPILER:STRING=",
"DCMAKE_PREFIX_PATH:STRING=C:/Qt/5.13.1/msvc2015_64",
"DQT_QMAKE_EXECUTABLE:STRING=C:/Qt/5.13.1/msvc2015_64/bin/qmake.exe".
The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
The CMAKE_CXX_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 "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
Configuring incomplete, errors occurred!
See also "C:/Users/tany/AppData/Local/Temp/QtCreator-pKrFgC/qtc-cmake-DqmsxZqd/CMakeFiles/CMakeOutput.log".
See also "C:/Users/tany/AppData/Local/Temp/QtCreator-pKrFgC/qtc-cmake-DqmsxZqd/CMakeFiles/CMakeError.log".
CMake Deprecation Warning:
The 'cmake-server(7)' is deprecated. Please port clients to use the
'cmake-file-api(7)' instead.
CMake Project parsing failed.
Now if I use the Cmake-GUI instead, I can configure and generate the project files successfully, after supplying the environment variable CMAKE_PREFIX_PATH.
But I can't get this to work from inside the QTcreator.
Anyone has any experience with using Cmake with QTcreator then please help.
Thank you!
The error message says that your C++ compiler Visual Studio 2015 (64 bits) could not be located. Maybe when you run cmake-gui it finds another C++ compiler like mingw?
In Qtcreator's settings dialog you have a tab showing the detected compilers, and another one with the available kits.
It seems that QtCreator is using a deprecated version of cmake. Update QtCreator to a new (unreleased, as writing this comment, version 4.10.0 is broken) or downgrade cmake to choco.exe install cmake --version 3.11 --force (a newer version might work).
Please also make sure to install jom (as this is the default for QtCreator/CMake on windows).
choco.exe install jom (how can I tell it to use make?)
The deprecation warning is harmless. CMake deprecated the cmake-server and provides a new API for the same purpose now. Qt Creator will support that from 4.11.
The error tells you, that CMake is unable find the cl compiler. cl.exe comes with Visual Studio. Make sure you mark C++ there during the installation process. It is not installed by default anymore.
Alternatively install the MinGW tool chain from the Qt installer. In Qt context it is easier to use than the Visual Studio tool chain.
I've downloaded and installed the QT SDK and downloaded the QT Mobility source.
Following the provided instructions, I navigated to my QtMobility directory via the Visual Studio Command Prompt (2010)... note, this is the QtMobility dir with the bin, plugins, examples, etc. folders.
D:\
cd D:\Files\Downloads\QtMobility
configure
Regardless of whether I gave configure a -prefix parameter or not, the following output was displayed:
Checking available Qt
4.8.2
Checking make
... Unknown target environment .
Cannot find 'nmake', 'mingw32-make' or 'make' in your PATH
Aborting.
Of course, I then went to see if my computer had nmake in its PATH: the directory is added as follows:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
I went to CMD and typed in "nmake /?" to receive proper output.
What am I doing wrong? When I try to simply run nmake in the QTMobility directory, it displays:
NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.
Help, please! Thank you. :) I will continue attempting debugs on my own...
I suppose this is late but you could simply run the visual studio command prompt, as it has specific env. variables preset to find nmake, etc.
I have 2 versions of Qt for different arm devices and different toolchains: Qt 4.5.2 and Qt 4.7.3. Both versions are supposed to be placed in /opt/onyx/arm directory :(
The following error is occurred if I move the 1st Qt build in another directory (/usr/arm-marvell-linux-gnueabi) and run qmake:
#!/bin/sh
export QTDIR=/usr/arm-marvell-linux-gnueabi
/usr/arm-marvell-linux-gnueabi/bin/qmake -o Makefile.qt.onyx.a6x -spec qws/arm-marvell-linux-gnueabi-g++ project.pro
./run_qmake1.sh
Could not find mkspecs for your QMAKESPEC(qws/arm-marvell-linux-gnueabi-g++) after trying:
/opt/onyx/arm/mkspecs
Error processing project file: project.pro
What could be the issue and how can I resolve the /opt/onyx/arm conflict?
I would recommend grepping through /usr/arm-marvell-linux-gnueabi for any references to /opt/onyx. If you can't successfully change them (because they're in a binary), you could use symlinks to switch toolchains as needed.
I have just purchased a Macbook (yes I am a complete noob on Mac though I have some considerable experience with Linux) and I'm trying to build my Qt application on it. I have installed XCode and the Qt SDK but when I try to build my project on Qt Creator all I get is the following error during qmake:
Running build steps for project TimeTracker...
Starting: "/usr/bin/qmake" /Users/raphaelcruzeiro/Documents/Projects/Timely/Widget/TimeTracker/TimeTracker.pro -r -spec macx-g++
Failure to open file: /Developer/Applications/Qt/Makefile
Unable to generate makefile for: /Users/raphaelcruzeiro/Documents/Projects/Timely/Widget/TimeTracker/TimeTracker.pro
The process "/usr/bin/qmake" exited with code %2.
Error while building project TimeTracker (target: Desktop)
When executing build step 'qmake'
Any ideas on what is going on? /Developer/Applications/Qt/Makefile indeed does not exist.
EDIT:
Ok, I know what is going on but I don't know how to fix it. When I ran qmake from the terminal everything went just fine. I believe that Qt Creator is trying to build my application on the Qt directory itself and it does nt have permission for it (it shouldn't anyway).
How do I tell Qt Creator where to build my application? I didn't find it anywhere and setting the DESTDIR variable isn't helping.
THE SOLUTION:
Deleting the .pro.user file made Qt Creator build the application to the directory specified in DESTDIR
THE SOLUTION:
Deleting the .pro.user file made Qt Creator build the application to the directory specified in DESTDIR
I was battling with the same thing. What helped eventually was resetting the default build directory here: