Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator/designer and MSVC2008?
Forum Updated to NodeBB v4.3 + New Features

Qt Creator/designer and MSVC2008?

Scheduled Pinned Locked Moved Qt Creator and other tools
16 Posts 5 Posters 9.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pelig
    wrote on last edited by
    #6

    I've added include directories and linker paths...
    But how do I select MSVC qt version?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #7

      pelig: Check tools->options->tool chains: Is your MSVC listed there?

      If not, check your MSVC installation and "file a bug report":http://bugreports.qt.nokia.com/ giving details on the install location/windows version, etc.

      Assuming that the MSVC is detected, please check your Qt versions (Tools->Options->Qt4). Do you have one for that version of MSVC installed? If not: Install one.

      Check your project settings (Project mode->build settings, Qt Version): Is that the one for the MSVC version you are using? If not: Change it.

      Note: The Qt versions shipped with the Qt SDK are installed for the Qt Creator that is also part of the Qt SDK. Other Qt Creators will not autodetect those Qt versions and you will need to add those manually there if you want to use them.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pelig
        wrote on last edited by
        #8

        [quote author="Tobias Hunger" date="1318865556"]pelig: Check tools->options->tool chains: Is your MSVC listed there?[/quote]Yep!

        [quote author="Tobias Hunger" date="1318865556"] Assuming that the MSVC is detected, please check your Qt versions (Tools->Options->Qt4). Do you have one for that version of MSVC installed? If not: Install one.[/quote]I have!

        [quote author="Tobias Hunger" date="1318865556"] Check your project settings (Project mode->build settings, Qt Version): Is that the one for the MSVC version you are using? If not: Change it.[/quote]Indeed it is!

        [quote author="Tobias Hunger" date="1318865556"] Note: The Qt versions shipped with the Qt SDK are installed for the Qt Creator that is also part of the Qt SDK. Other Qt Creators will not autodetect those Qt versions and you will need to add those manually there if you want to use them.[/quote]Guess that's OK since all stuff above is OK?

        The build steps (qmake and Make respectively) in the Build Settings are:

        • qmake: qmake.exe TextFinder.pro -f -spec win32-msvc2008
        • Make: jom.exe in <build path>

        Does that look OK?

        I also tried running qmake (as specified above) in command prompt but nothing happens. I switch on some warning flags, and it complains on the msvc files?
        @C:\work\TextFinder>qmake.exe -Wall TextFinder.pro -r -spec win32-msvc2008
        WARNING: Operator=(QMAKE_RCC) clears variables previously set: c:\QtSDK\Desktop\Qt\4.7.4\msvc2008\mkspecs\features\qt_functions.prf:101
        WARNING: Operator=(QMAKE_UIC3) clears variables previously set: c:\QtSDK\Desktop\Qt\4.7.4\msvc2008\mkspecs\features\qt_functions.prf:101@

        Am I doing something fundamentally wrong here?

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #9

          Why do you use jom for make and not nmake, which comes with msvs?
          After running qmake in commandline, I would run nmake :-)

          Nokia Certified Qt Specialist.
          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pelig
            wrote on last edited by
            #10

            OK I forgot to run the jom.exe part:

            @c:\QtSDK\QtCreator\bin\jom.exe -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_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"......\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\QtCore" -I"......\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\QtGui" -I"......\QtSDK\Desktop\Qt\4.7.4\msvc2008\include" -I"......\WinDDK\7600.16385.1\inc\api" -I"......\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\ActiveQt" -I"debug" -I"." -I"......\QtSDK\Desktop\Qt\4.7.4\msvc2008\mkspecs\win32-msvc2008" -Fodebug\ @C:\Users\PETERL~1\AppData\Local\Temp\main.obj.1188.0.jom
            main.cpp
            C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stddef.h(44) : error C2065: 'In' : undeclared identifier
            C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stddef.h(44) : error C2144: syntax error : 'int' should be preceded by ')'
            [cut]
            C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\QtCore/qglobal.h(854) : error C2146: syntax error : missing ';' before identifier 'qlonglong'
            C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\QtCore/qglobal.h(855) : error C2146: syntax error : missing ';' before identifier 'qulonglong'
            [cut]@
            I get loads of errors in both MSVC2008 and Qt include files. Am I just missing some define flag?

            1 Reply Last reply
            0
            • K Offline
              K Offline
              koahnig
              wrote on last edited by
              #11

              You have an additional '-' in the command line after wchar_t. Is it a copy and paste problem?

              [quote author="pelig" date="1318922949"]
              @
              cl -c -nologo -Zm200 -Zc:wchar_t- -Zi ...
              @
              [/quote]

              Vote the answer(s) that helped you to solve your issue(s)

              1 Reply Last reply
              0
              • P Offline
                P Offline
                pelig
                wrote on last edited by
                #12

                OK, I tried both 'nmake' and removing the hyphen after whar_t. Doesn't matter, same faults:
                @C:\data\qt-workspace\TextFinder>nmake
                Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
                Copyright (C) Microsoft Corporation. All rights reserved.
                "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" -f Makefile.Debug
                Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
                Copyright (C) Microsoft Corporation. All rights reserved.
                cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -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 -I"......\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\QtCore" -I"......\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\QtGui" -I"......\QtSDK\Desktop\Qt\4.7.4\msvc2008\include" -I"......\WinDDK\7600.16385.1\inc\api" -I"......\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\ActiveQt" -I"debug" -I"." -I"......\QtSDK\Desktop\Qt\4.7.4\msvc2008\mkspecs\win32-msvc2008" -Fodebug\ @C:\Users\PETERL~1\AppData\Local\Temp\nmBB0.tmp
                main.cpp
                C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stddef.h(44) : error C2065: 'In' : undeclared identifier
                C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stddef.h(44) : error C2144: syntax error : 'int' should be preceded by ')'@
                And so on as previous posting. I'm running out of ideas here...

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #13

                  [quote author="Gerolf" date="1318922776"]Why do you use jom for make and not nmake, which comes with msvs?
                  After running qmake in commandline, I would run nmake :-)[/quote]

                  jom is a nmake compatible replacement. It adds support for multicore compilation (-jxx for reglar (gnu) make), which speeds up compilation time a lot :)

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    pelig
                    wrote on last edited by
                    #14

                    OK, thanks for the jom clarification. But I still can't build my project, with or without jom...

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      koahnig
                      wrote on last edited by
                      #15

                      Concerning your question on missing define flags you have to have a look to stddef.h then. It might be dependend on the version you have.

                      It is good that you have checked with nmake as well. Volker is right, jom speeds up things quite considerably. However, this is certainly not a problem for you yet. :-( However, in my experience there some times strange error messages because of serveral compilations in parallel with msvc. Those are not jom-related, but occur msvc IDE itself.

                      Vote the answer(s) that helped you to solve your issue(s)

                      1 Reply Last reply
                      0
                      • P Offline
                        P Offline
                        pelig
                        wrote on last edited by
                        #16

                        Solved!
                        Well, at least I can build my Qt test project with Visual nmake/cl.exe.
                        The problem was in the generated Makefile.Debug file.
                        I created a test project in my installed Visual Studio 2008 Express and compared the MSVC build command with the qt Makefile build command. I then made following changes in the Makefile.Debug:

                        • Removed alot of defines and added a few.
                        • Changed include path from relative to absolute
                        • Removed most include paths, just kept the necessary ones
                        • Added a bunch of Windows static libs (kernel32.lib user32.lib just to mention a few)
                        • Changed "-D" and "-I" to "/D" and "/I" for defines and include paths respectively. Dunno if that really is needed, but so it was in my MSVC project...

                        The question is how to create the Makefile.Debug with qmake so it works from the start?

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved