qtCreator wont compile Hello World Program
I downloaded the whole qtSDK and installed it. Then i launched the qtCreator and try to run the Hello-World-Program as a qt console application. It didnt compile and said that it couldnt find "cl". So I researched on the internet and made a batch file containing
Code:
SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
start C:\QtSDK\QtCreator\bin\qtcreator.exe
That fixed the error about the missing "cl"-file, but the jom.exe still exits with code 2 and doesnt compile:
Code:
jom 1.0.6 - empower your cores
command failed with exit code 2
command failed with exit code 2
command failed with exit code 2
12:30:35: The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
Error while building project Hello2 (target: Desktop)
When executing build step 'Make'
I hope you can help me.
PS: My program code looks like this, but i doubt, thats the problem:
Code:
#include <QtCore/QCoreApplication>
int main(int argc, char *argv[])
{
return a.exec();
}
I have installed VS 2010 Express Edition and am using Windows 7 64 bit OS.
Re: qtCreator wont compile Hello World Program
I guess you are posting here what appers in the Build Issues window. You should see what happens in the Compile Output window to get a clue about what jom is trying to do but fails trying.
Re: qtCreator wont compile Hello World Program
No, actually that is the Compile Output. Here is the complete one:
Code:
16:19:40: Running build steps for project Hello2...
16:19:40: Configuration unchanged, skipping qmake step.
16:19:40: Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
C:\QtSDK\QtCreator\bin\jom.exe -nologo -j 4 -f Makefile.Debug
cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.8.0\msvc2010\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.8.0\msvc2010\include" -I"c:\QtSDK\Desktop\Qt\4.8.0\msvc2010\include\ActiveQt" -I"debug" -I"..\Hello2" -I"." -I"c:\QtSDK\Desktop\Qt\4.8.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ @C:\Users\JOHANN~1\AppData\Local\Temp\main.obj.4540.0.jom
jom 1.0.6 - empower your cores
command failed with exit code 2
command failed with exit code 2
command failed with exit code 2
16:19:41: The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
Error while building project Hello2 (target: Desktop)
When executing build step 'Make'
Now, that I read it: my Windows username consists of two words divided by a space and contains special characters (like "ü"). Could this cause the problem?
Re: qtCreator wont compile Hello World Program
I made it finally work now by additionally downloading the Qt4.8.0 for Mingw and using this compiler instead of the VC one.