Results 1 to 4 of 4

Thread: qtCreator wont compile Hello World Program

  1. #1
    Join Date
    Feb 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default 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

    Qt Code:
    1. SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
    2. start C:\QtSDK\QtCreator\bin\qtcreator.exe
    To copy to clipboard, switch view to plain text mode 

    That fixed the error about the missing "cl"-file, but the jom.exe still exits with code 2 and doesnt compile:

    Qt Code:
    1. jom 1.0.6 - empower your cores
    2.  
    3. command failed with exit code 2
    4. command failed with exit code 2
    5. command failed with exit code 2
    6. 12:30:35: The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
    7. Error while building project Hello2 (target: Desktop)
    8. When executing build step 'Make'
    To copy to clipboard, switch view to plain text mode 

    I hope you can help me.

    PS: My program code looks like this, but i doubt, thats the problem:

    Qt Code:
    1. #include <QtCore/QCoreApplication>
    2.  
    3. int main(int argc, char *argv[])
    4. {
    5. QCoreApplication a(argc, argv);
    6.  
    7. return a.exec();
    8. }
    To copy to clipboard, switch view to plain text mode 

    I have installed VS 2010 Express Edition and am using Windows 7 64 bit OS.

  2. #2
    Join Date
    May 2011
    Posts
    239
    Thanks
    4
    Thanked 35 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default 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.

  3. #3
    Join Date
    Feb 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qtCreator wont compile Hello World Program

    No, actually that is the Compile Output. Here is the complete one:

    Qt Code:
    1. 16:19:40: Running build steps for project Hello2...
    2. 16:19:40: Configuration unchanged, skipping qmake step.
    3. 16:19:40: Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
    4. C:\QtSDK\QtCreator\bin\jom.exe -nologo -j 4 -f Makefile.Debug
    5. 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
    6.  
    7. jom 1.0.6 - empower your cores
    8.  
    9. command failed with exit code 2
    10. command failed with exit code 2
    11. command failed with exit code 2
    12. 16:19:41: The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
    13. Error while building project Hello2 (target: Desktop)
    14. When executing build step 'Make'
    To copy to clipboard, switch view to plain text mode 

    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?
    Last edited by realJohnDoe; 28th February 2012 at 15:29.

  4. #4
    Join Date
    Feb 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default 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.

Similar Threads

  1. Hello World program 5 MB!
    By Yes in forum Qt-based Software
    Replies: 2
    Last Post: 8th November 2011, 11:24
  2. Program wont start - Wont even enter main()
    By ComServant in forum General Programming
    Replies: 5
    Last Post: 8th January 2011, 03:44
  3. My first Linux QT program wont compile
    By GrahamLabdon in forum Newbie
    Replies: 1
    Last Post: 27th October 2010, 15:49
  4. Qt Opensource 4.5.2 wont compile
    By MarkoSan in forum Installation and Deployment
    Replies: 8
    Last Post: 26th November 2009, 06:56
  5. New Win install, Hello World compile error.
    By dougbroadwell in forum Installation and Deployment
    Replies: 3
    Last Post: 3rd April 2008, 06:53

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.