Just started with Qt. Cannot compile anything.
-
Download Qt for windows but cannot run anything (e.g. test code).
Always says this:
@mingw32-make.exe[1]: *** [debug/main.o] Error 1
mingw32-make.exe: *** [debug] Error 2
21:56:11: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
Error while building project qtconsole (target: Qt Simulator)
When executing build step 'Make'@Sorry if this is a stupid question!
-
More output is needed, there appears to be an error compiling the source code that should be higher up in the output.
-
I suggest you should check if your target simulator is installed.
-
[quote author="Terence Simpson" date="1346189890"]More output is needed, there appears to be an error compiling the source code that should be higher up in the output.[/quote]
@22:24:07: Running build steps for project QTTEST2...
22:24:07: Starting: "c:\qtsdk\desktop\qt\4.8.1\mingw\bin\qmake.exe" C:\Users\tomh\QTTEST2\QTTEST2.pro -r -spec win32-g++ "CONFIG+=declarative_debug"
22:24:07: The process "c:\qtsdk\desktop\qt\4.8.1\mingw\bin\qmake.exe" exited normally.
22:24:07: Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe"
C:/QtSDK/mingw/bin/mingw32-make.exe -f Makefile.Debug
mingw32-make.exe[1]: Entering directoryC:/Users/tomh/QTTEST2-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug' c:\QtSDK\Desktop\Qt\4.8.1\mingw\bin\uic.exe ..\QTTEST2\mainwindow.ui -o ui_mainwindow.h g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\QtSDK\Desktop\Qt\4.8.1\mingw\include\QtCore" -I"..\..\..\QtSDK\Desktop\Qt\4.8.1\mingw\include\QtGui" -I"..\..\..\QtSDK\Desktop\Qt\4.8.1\mingw\include" -I"..\..\..\QtSDK\Desktop\Qt\4.8.1\mingw\include\ActiveQt" -I"debug" -I"." -I"..\QTTEST2" -I"." -I"..\..\..\QtSDK\Desktop\Qt\4.8.1\mingw\mkspecs\win32-g++" -o debug\main.o ..\QTTEST2\main.cpp mingw32-make.exe[1]: Leaving directory
C:/Users/tomh/QTTEST2-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug'
mingw32-make.exe[1]: *** [debug/main.o] Error 1
mingw32-make.exe: *** [debug] Error 2
22:24:07: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
Error while building project QTTEST2 (target: Desktop)
When executing build step 'Make'@ -
[quote author="A.A.B.A" date="1346190049"]I suggest you should check if your target simulator is installed.
[/quote]How do I check this?
-
You are using a wrong build configuration, I presume.
- Open your project in Qt Creator.
- Go to "Projects" section on the left panel of Qt Creator and select the "Build Settings" tab.
- Click the "Add" to add a build configuration and choose a configuration from the list that mentions either MinGW or MSVC (Microsoft Visual C++ Compiler) in its name.
To install Microsoft Visual C++ Compiler 2010 you should have either Microsoft Visual Studio 2010 or the latest "Windows 7 SDK":http://www.microsoft.com/en-us/download/details.aspx?id=8279
To install GNU Compiler Collection (gcc) for Windows (MinGW for short), you should install QtSDK (not Qt library). QtSDK includes several version of Qt library. When installing QtSDK and select to install MinGW as well as Qt library 4.8.1 built using MSVC 2010 and Qt library 4.8.1 built using MinGW (the latter is selected by default).
-
It still isn't working. Can someone please help?
-
Hmmm, this is strange, for me the SDK has always worked out-of-the-box.