Qt and VS2010

  • 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
    cd bin

    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.

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

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

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

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

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

  • Visual studio is never very helpful in creating new projects.

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

  • The syntax

    @#include <xxxxx>@

    implies that the compiler knows the base path.

    So give it the base path in the options

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

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.