Failed to build project using newly compiled QtCreator - qt

I used to build the QtCreator from source as a 64 bit application for my machine to do development tasks. Recently, I restored the OS and attempted to re-build the QtCreator from source but faced a weird problem. The fresh building process for the Qt library and the QtCreator completed nicely, but when I try to build a previously working project, the tool complains the following message:
09:39:55: Running steps for project HKPopSim...
09:39:55: Starting: "C:\QtSuite\qt-4.8-gcc-4.8\bin\qmake.exe" C:\workspace\HKPopSim\GUI\HKPopSim.pro -r -spec win32-g++ "CONFIG+=declarative_debug"
09:39:55: The process "C:\QtSuite\qt-4.8-gcc-4.8\bin\qmake.exe" exited normally.
09:39:55: Starting: "make" qtcreator_ctrlc_stub: Command line failed: make
09:39:55: The process "make" crashed.
Error while building/deploying project HKPopSim (kit: Desktop)
When executing step 'Make'
09:39:55: Elapsed time: 00:01.
To start the Qtcreator, (as not to pollute the PATH env. variable), I wrote the following batch script.
#SETLOCAL
#SET QTCBIN=C:\QtSuite\QtCreator-2.7.1-gcc-4.8\bin
#SET QTDIR=C:\QtSuite\qt-4.8-gcc-4.8
#SET "OPATH=%PATH%"
#SET "PATH=C:\MinGW\rubenvb-4.8.0-64\bin"
#SET "PATH=%PATH%;%QTCBIN%"
#SET "PATH=%PATH%;%QTDIR%\bin"
#SET "PATH=%PATH%;%SYSTEMROOT%\System32;
#START %QTCBIN%\qtcreator.exe
#ENDLOCAL
I don't know how come the QtCreator claims that it needs 'make.exe' for building process. I do have a 'make.exe' at C:\GNUWin32\bin, but as shown in the script, it should never be detected by the Creator.
What have been verified:
I once verified that with similar configuration on another machine, the tool call 'mingw32-make.exe' for building process.
The 'Compilers' setting in the QtCreator correctly (auto-)detected the only gcc compilers in the path (C:\MinGW\rubenvb-4.8.0-64\bin)
The 'Qt Version' setting in the QtCreator correctly (manually) detected the only qmake in the path (C:\QtSuite\qt-4.8-gcc-4.8\bin)
Please suggest anything I missed. Thanks
Platform
Win 7 x64
MinGW x64 (rubenvb-4.8.0)
Qt library (4.8.5, not the latest src)
Qt creator (2.7.1)

Related

qmlplugindump error when building with MinGW 64bits (Qt 5.13.1)

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.

qt creator needs a compiler set up to build. configure a compiler in the kit options, after adding compiler, cannot produce code for the qt version

alright.. i downloaded and installed qt 5.1.1 (msvc2012, 64 bit) on my windows 7. i tried to run a simple qt gui application... and this is what happened:
when i pressed "run"... there was error.. it said:
"qt creator needs a compiler set up to build. configure a compiler in the kit options"
then i found i had a list of 4 compilers to add from... when i added mingw... it said:
"the compiler mingw cannot produce codes for the qt version 'qt 5.1.1 MSVC2012 64 bit'"
it did the same for all the other compilers that i chose from the list of 4... nevertheless, i pressed "run" again.. as expected, it did not work... and this was the compile output:
19:16:31: Running steps for project code...
19:16:31: Starting: "C:\Qt\Qt5.1.1\5.1.1\msvc2012_64\bin\qmake.exe" C:\Users\shades\code\code.pro -r -spec win32-g++
19:16:31: The process "C:\Qt\Qt5.1.1\5.1.1\msvc2012_64\bin\qmake.exe" exited normally.
19:16:31: Starting: "mingw32-make.exe" -r -w
qtcreator_ctrlc_stub: Command line failed: mingw32-make.exe -r -w
19:16:32: The process "mingw32-make.exe" exited with code -1.
Error while building/deploying project code (kit: Desktop Qt 5.1.1 MSVC2012 64bit)
When executing step 'Make'
19:16:32: Elapsed time: 00:01.
what do i do?? please please help....
The Qt version youh have is for use with the compiler MSVC2012 64 bit. That compiler is for Microsoft Visual C 2012 64 bit.
You should download the MinGW version if you want to use that compiler. The installer of the mingw version of Qt comes with the compilers for MinGW.

Qt 5.1 with VS2012 compiler - code 128 error

I am trying to set up Qt 5.1 with MS Visual Studio 2012 compiler. I have downloaded and installed the VS Express (it works and compiles C++ code just fine) and then installed Qt.
Here is the console output from whenever I try to build anything:
09:07:14: Running steps for project cube...
09:07:14: Starting: "C:\Qt\Qt5.1.0\5.1.0\msvc2012_64\bin\qmake.exe" C:\Qt\Qt5.0.2\5.0.2\msvc2012_64\examples\opengl\cube\cube.pro -r -spec win32-msvc2012 "CONFIG+=debug" "CONFIG+=declarative_debug" "CONFIG+=qml_debug"
09:07:15: The process "C:\Qt\Qt5.1.0\5.1.0\msvc2012_64\bin\qmake.exe" exited normally.
09:07:15: Starting: "C:\Qt\Qt5.1.0\Tools\QtCreator\bin\jom.exe"
Usage: jom #commandfile
jom [options] [/f makefile] [macro definitions] [targets]
nmake compatible options:
/A build all targets
/D display build information
/E override environment variable macros
/F <filename> use the specified makefile
/G display included makefiles
/H show help
/I ignore all exit codes
/K keep going - build unrelated targets on error
/N dry run - just print commands
/NOLOGO do not print logo
/P print makefile info
/R ignore predefined rules and macros
/S silent mode
/U print content of inline files
/L same as /NOLOGO
/W print the working directory before and after other processing
/X <filename> write stderr to file.
/Y disable batch mode inference rules
jom only options:
/DUMPGRAPH show the generated dependency graph
/DUMPGRAPHDOT dump dependency graph in dot format
/J <n> use up to n processes in parallel
/KEEPTEMPFILES keep all temporary files
/VERSION print version and exit
Error: unknown command line option '-' in arguments: '/L-IC:/QNX650/target/qnx6/usr/include'
09:07:15: The process "C:\Qt\Qt5.1.0\Tools\QtCreator\bin\jom.exe" exited with code 128.
Error while building/deploying project cube (kit: Desktop Qt 5.1.0 MSVC2012 64bit)
When executing step 'Make'
09:07:15: Elapsed time: 00:01.
Earlier I had the same problem with 5.0.2 (basically that's why I killed it and installed 5.1).
I couldn't Google anything reasonable regarding this kind of error. Looks like 128 propagates from somewhere within Visual Studio, but I can't figure out what it is.
Could anybody suggest how can I debug and fix this?
Thanks
... And there's nothing that helps you figure out the problem better than writing it down and then starting at the post.
The "/L-IC:/QNX650/target/qnx6/usr/include" actually tells me that QNX SDK installed on my machine is messing with my environment variables. Luckily, Qt has a way of dealing with that. I need to go to Projects tab, expand the "build environment" section and unset the "MAKEFLAGS" environment variable. This fixes it.

Qt Compile Time Error . .

I am new to Qt, and I am facing the follwoing error. I have set all the environment variables. I don't know what the problem is. Kindly Help me.
11:44:39: Running build steps for project rabiaapp...
11:44:39: Configuration unchanged, skipping qmake step.
11:44:39: Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
c:\QtSDK\Desktop\Qt\4.8.0\msvc2008\bin\uic.exe ..\rabiaapp\mainwindow.ui -o ui_mainwindow.h
C:\QtSDK\QtCreator\bin\jom.exe -f Makefile.Debug
Error: cannot open C:\Windows\main.obj.5540.16.jom for write
jom 1.0.8 - empower your cores
jom: C:\Users\rs01\rabiaapp-build-desktop-Qt_4_8_0_for_Desktop_-_MSVC2008__Qt_SDK__Debug\Makefile [debug] Error 1
11:44:39: The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
Error while building project rabiaapp (target: Desktop)
When executing build step 'Make'
I can reproduce this problem if I check "Clear system environment" on the Projects' Build Settings page. Try unchecking that box.
I encountered a similar problem. My TMP variable has Chinese characters, which makes qt creator produce error: cannot open ** for write.
Try to change your TMP variable with only English characters, no spaces. Ensure that the folder exists and you have permissions to access it.
My Qt version: Qt 5.4.0 for Windows 32-bit (VS 2013, OpenGL). You can set this in Qt Creator
Try using nmake instead of jom there should be a checkbox in Settings-> Build and Run -> uncheck use jom instead of nmake.

Error when executing step 'qmake' on Mac Os

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:

Resources