Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt and VS2010
Forum Updated to NodeBB v4.3 + New Features

Qt and VS2010

Scheduled Pinned Locked Moved Installation and Deployment
10 Posts 3 Posters 4.4k 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
    pbhuter
    wrote on last edited by
    #1

    I am pretty sure I have gotten Qt properly build (4.7.3) by doing the following from a VS010 command prompt:

    cd C:\qt\4.7.3
    set QMAKESPEC=win32-msvc2010
    configure -debug-and-release -opensource -platform win32-msvc2010 -no-phonon
    nmake
    cd bin
    qtvars
    devenv

    VS shows that Qt 4.7.3 is available (I have the add-in installed)...however lines such as:

    #include <QFile>

    aren't recognized by VS. What am I doing wrong? Thanks in advance for all your help.

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      Did you create a Qt Project in visual studio? Ticked the right modules?

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

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

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pbhuter
        wrote on last edited by
        #3

        I just created a new project in VS. I saw the option for a Qt project, but I didn't know I needed to do that. Could you walk me through the process? I guess I've never started a project from scratch, I've always just copied an old project and removed all the stuff I didn't need.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          Franzk
          wrote on last edited by
          #4

          The qt plug-in helps a great deal in setting up a new Qt project; they have a wizard that is actually somewhat helpful. Just go for a Qt GUI application and you're ready to go.

          "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

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

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gedd
            wrote on last edited by
            #5

            You must specify the include path in the Visual Studio path options

            Gedd

            1 Reply Last reply
            0
            • P Offline
              P Offline
              pbhuter
              wrote on last edited by
              #6

              I'm figuring out the include path stuff, now at work with a Qt project. I love Qt, I just wish it was easier to get started with a project, though. Thanks for all the help.

              1 Reply Last reply
              0
              • F Offline
                F Offline
                Franzk
                wrote on last edited by
                #7

                Visual studio is never very helpful in creating new projects.

                "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

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

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

                  You're probably right - it's not Qt, it's VS.

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

                    The syntax

                    @#include <xxxxx>@

                    implies that the compiler knows the base path.

                    So give it the base path in the options

                    Gedd

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

                      I have a list of folders to add to the Include path for VS. I was assuming too much when I was compiling Qt. I ran into the same problem at work this morning with a new project, and had to copy the folders over from an existing project. I think I may have finally gotten it all up and running (assuming when I get home adding files to the Include path is all I need to do), and I can start my project. Thanks for all the help.

                      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