Results 1 to 17 of 17

Thread: Problem getting Qt 4.3.3 to work with MS Visual Studio 2005 Express

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Problem getting Qt 4.3.3 to work with MS Visual Studio 2005 Express

    Hi,

    I'm trying to get Qt 4.3.3 to work with MS Visual Studio 2005 Express on a Windows Vista 64bit machine. I know I could use Mingw and Eclipse, but I need Visual Studio for another C++ library.

    I have installed Visual Studio and Qt 4.3.3 (well unzipped qt-win-opensource-src-4.3.3), I added the bin directory of Qt to the PATH. I opened the Visual Studio 2005 Command Prompt and went to the Qt directory. According to different wikis I read I don't need any patching and I should enter the command: configure -platform win32-msvc2005 . But that doesn't work, I get the error:

    C:\Qt\4.3.3>configure -platform win32-msvc2005
    Invalid option "win32-msvc2005" for -platform.
    See the README file for a list of supported operating systems and compilers.
    Usage: configure [-buildkey <key>]
    ....
    Already tried different other combinations, but non of them worked. Thought the installation process would be the easiest one Hope someone can help me. Thanks.

    Kind regards,

    Nick
    Last edited by jpn; 16th January 2008 at 10:41. Reason: reformatted to look better

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem getting Qt 4.3.3 to work with MS Visual Studio 2005 Express

    What happens if you don't pass the platform option at all (run "configure" with no options)? With a bit of luck your VS should be detected automatically.

  3. #3
    Join Date
    Jan 2008
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem getting Qt 4.3.3 to work with MS Visual Studio 2005 Express

    Nope, doesn't work either. Just running configure without any options gives me:

    C:\Qt\4.3.3>configure
    Unable to detect the platform from environment. Use -platform command lineargument or set the QMAKESPEC environment variable and run configure again
    See the README file for a list of supported operating systems and compilers.
    It says to set QMAKESPEC, to what should I set it?

    Kind regards,

    Nick
    Last edited by jpn; 16th January 2008 at 10:40. Reason: reformatted to look better

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem getting Qt 4.3.3 to work with MS Visual Studio 2005 Express

    Quote Originally Posted by nicksnels View Post
    It says to set QMAKESPEC, to what should I set it?
    win32-msvc.net

    BTW. Looks like you simply forgot the dot between "msvc" and "net". Try adding it, it should work just fine.

  5. #5
    Join Date
    Nov 2007
    Posts
    89
    Thanked 21 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem getting Qt 4.3.3 to work with MS Visual Studio 2005 Express

    Quote Originally Posted by wysota View Post
    win32-msvc.net
    But he says he use MSVC express 2005, so it should be win32-msvc2005.

    I too use MVCS Express 2005* on Vista 64, and I got no problem installing Qt. Maybe the extraction went wrong, check if exists a 'mkspecs' directory in %QTDIR%, and if it contains a 'win32-msvc2005' directory. Try also to redownload qt source package.

    * Actually I'm using 2008 version, but it worked also when I used 2005.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem getting Qt 4.3.3 to work with MS Visual Studio 2005 Express

    Hmm... right... I have to stop answering questions at 1am... I use 2005 myself, but with a 32 bit system.

  7. #7
    Join Date
    Jan 2008
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem getting Qt 4.3.3 to work with MS Visual Studio 2005 Express

    Thanks for all the replies. Managed to get a bit further. I redownloaded the sources as I was missing quite a few things. Also installed a MS SDK according to the information provided by http://kjell.hedstrom.googlepages.co...o_express_2005 . I set QTDIR (c:\Qt\4.3.3),QMAKESPEC (win32-msvc2005) and added the Qt bin directory to the PATH and ran configure - prefix c:\Qt4.3.3 . It runs for a while and compiles things and after a while a get:

    Creating qmake...

    Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
    Copyright (C) Microsoft Corporation. All rights reserved.

    Creating makefiles in src...
    Generating Visual Studio project files...
    Could not find mkspecs for your QMAKESPEC(win32-msvc2005) after trying:
    c:\Qt4.3.3\mkspecs
    Error processing project file: C:/Qt/4.3.3/projects.pro
    Qmake failed, return code 3

    Generating Makefiles...
    Could not find mkspecs for your QMAKESPEC(win32-msvc2005) after trying:
    c:\Qt4.3.3\mkspecs
    Error processing project file: C:/Qt/4.3.3/projects.pro
    Qmake failed, return code 3
    And then it stops. Any ideas what may be causing this? I have a folder win32-msvc2005 in c:\Qt\4.3.3\mkspecs and it has two files qmake.conf and qplatformdefs.h . Thanks.

    Kind regards,

    Nick
    Last edited by jpn; 16th January 2008 at 10:40. Reason: missing [quote] tags

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem getting Qt 4.3.3 to work with MS Visual Studio 2005 Express

    Skip the prefix. If you want the prefix, issue "make install_mkspecs" after qmake complains. It should then install the specs to the specified directory and when you restart the configuration process it should work fine. Of course you can also copy the mkspecs directory to the one pointed to by the prefix yourself.

  9. #9
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem getting Qt 4.3.3 to work with MS Visual Studio 2005 Express

    The install prefix is really a problem - afaik it's not officially supported on windows. I've had several problems because some libs were not installed into <install_prefix>/bin. The latest one was that qttest(d)4.dll is not copied into there. This will be fixed in 4.3.4 or 4.4.0

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem getting Qt 4.3.3 to work with MS Visual Studio 2005 Express

    The problem (I also remember encountering it) is that on Windows mkspecs need to be in the prefixed directory for qmake to work even before Qt is compiled. Amazingly this is not an issue on Unix systems.

  11. #11
    Join Date
    Jan 2008
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem getting Qt 4.3.3 to work with MS Visual Studio 2005 Express

    So, I have just run configure without any options, but I get the same output. Is there a way to clean the output/result of the first configure I ran? Or should I just delete everything in the Qt folder and start all over again? Thanks.

    Kind regards,

    Nick

Similar Threads

  1. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  2. Qt configure with msvc.net
    By jivanr in forum Installation and Deployment
    Replies: 1
    Last Post: 11th June 2007, 08:17
  3. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  4. problem with linking
    By mickey in forum Qt Programming
    Replies: 49
    Last Post: 12th August 2006, 21:41
  5. Qt Designer & Visual Studio 2005
    By pSiCho in forum Qt Tools
    Replies: 6
    Last Post: 9th February 2006, 13:40

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
  •  
Qt is a trademark of The Qt Company.