Results 1 to 3 of 3

Thread: Visual Studio 2008 and Qt

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Visual Studio 2008 and Qt

    Hi everyone.

    I'm working with Visual Studio 2008 and Qt (I can't work only with Qt tools, too long to explain).

    Step:
    - Install Visual Studio 2008
    - Install the complete Qt environment
    - Install the Qt add-in for Visual Studio 2008

    Now, I understand that after this procedure I can work with Visual Studio without problem (no need to compile libraries or other things).

    But now, if I try to compile a simple HelloWorld program (the one you can find in the tutorial for Qt), it doesn't work.

    Step to create a project:
    - Open Visual Studio
    - File-> New -> Project -> Select "Qt4 project" and "Qt application"
    - in the Wizard, leave everything as default (so, it includes Core library and GUI library)
    - Now I have a project with some files (main.cpp example.cpp example.h example.ui).
    - Copy/paste the code in example.cpp into main.cpp
    - Compile

    Error: LNK1181: cannot open input file 'qtmaind.lib'

    What am I doing wrong?

    thanks in advance for helping me

    Konx.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Visual Studio 2008 and Qt

    I assume you installed the VS2008 version of Qt, rather than than the GCC/MinGW version? They are not compatible with each other.

    Did you set QTDIR variable?

  3. #3
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Visual Studio 2008 and Qt

    Quote Originally Posted by fatjuicymole View Post
    I assume you installed the VS2008 version of Qt, rather than than the GCC/MinGW version? They are not compatible with each other.

    Did you set QTDIR variable?
    Hi.

    Thanks for the answer!

    The problem was in fact that the QtDir variable was not properly set. Now it works perfectly (I totally forgot about the variable...my mistake)

    Thanks again

    Konx.

Similar Threads

  1. The How-To Guide: Qt4 with Visual Studio 2008
    By thomaspu in forum Qt Programming
    Replies: 18
    Last Post: 19th March 2010, 03:47
  2. Qt and Visual Studio Express Edition 2008
    By PUK_999 in forum Installation and Deployment
    Replies: 1
    Last Post: 20th August 2009, 13:36
  3. How to use Qt with Visual Studio 2008?
    By N3wb in forum Installation and Deployment
    Replies: 2
    Last Post: 13th August 2009, 16:23
  4. Qt 4.4.1 deployement with Visual Studio Express 2008
    By abrou in forum Installation and Deployment
    Replies: 8
    Last Post: 28th February 2009, 02:13
  5. Qt 4.3.2 + Visual studio 2008
    By moowy in forum Installation and Deployment
    Replies: 6
    Last Post: 6th December 2007, 06:41

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.