Results 1 to 10 of 10

Thread: Qt Open source + MSVC++ 2008

  1. #1
    Join Date
    Jan 2006
    Posts
    5
    Thanked 10 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Qt Open source + MSVC++ 2008

    I'm completely new to QT programming and have installed QT Open Source 4.3.2 and Microsoft Visual C++ 2008 Express Edition beta. According to a trolltech blog: .......Today (a week back actually), we made another big move. We have decided to support Visual Studio Express with Qt/Windows Open Source - we are dual licensing the MSVC Makefile and project generator........

    What are really the steps I have to make before I can compile my first QT application?
    Do I have to download and install the Windows platform SDK?
    Should I run "Qt 4.3.2 (Build Debug Libraries"?
    Seems like I have to manually add some pathes to the "VC++ Directories" in VC options anyway.
    Why don't Qt add the necessary info to the PATH variable during installation?
    Why don't Qt add the QTDIR variable during installation?
    How do I use this project generator thing?

  2. The following 2 users say thank you to TopFuel for this useful post:


  3. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Open source + MSVC++ 2008

    Why don't Qt add the necessary info to the PATH variable during installation?
    Why don't Qt add the QTDIR variable during installation?
    That is really is to do. Practically it shouldn't take you more that 30 seconds to do it.

    The reason why they don't add it because there is no installer for the open source version (only for the mingw compiled version).

    Should I run "Qt 4.3.2 (Build Debug Libraries"?
    Only if you need the debug libs. But, since you are just starting, it is a good idea to have them, because you might get curious about what happens under the hood.

    How do I use this project generator thing?
    qmake?
    you can generate a vcproj from a pro file.

    Do I have to download and install the Windows platform SDK?
    no.

  4. The following 2 users say thank you to marcel for this useful post:


  5. #3
    Join Date
    Jan 2006
    Posts
    5
    Thanked 10 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Open source + MSVC++ 2008

    I took the source files from one of the included samples and tried this:
    1) I ran "qmake -project tabdialog" to generate a .pro file. It worked.
    2) According to the documentation, Qt should be able to generate a Visual Studio project from a .pro file, but they don't explain well how to do it. "qmake -t vcapp" just says "WARNING: Unable to generate output..............". How should I do it then?

  6. The following 2 users say thank you to TopFuel for this useful post:


  7. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Open source + MSVC++ 2008

    qmake -tp vc -o hello.dsp hello.pro

  8. The following 2 users say thank you to marcel for this useful post:


  9. #5
    Join Date
    Jan 2006
    Posts
    5
    Thanked 10 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Open source + MSVC++ 2008

    Thanks for the help. Now I know how to to get a *.dsp file from a *.pro file. The bad thing is however that both Visual Studio 2005 and 2008 is unable to open it. It says "The project file .............dsp has been corrupted and cannot be opened.". Am I still doing something wrong or?

  10. The following 2 users say thank you to TopFuel for this useful post:


  11. #6
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Open source + MSVC++ 2008

    qmake is able to generate vcproj file too.
    Just call:
    Qt Code:
    1. qmake -tp vc
    To copy to clipboard, switch view to plain text mode 
    but first make sure you already have the pro file generated.

  12. The following 2 users say thank you to marcel for this useful post:


  13. #7
    Join Date
    Jan 2006
    Posts
    5
    Thanked 10 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Open source + MSVC++ 2008

    I'm getting closer, but I'm still not there yet!

    I used the QT command prompt for running your suggested commands. That is why it didn't work because the QMAKESPEC system variable that I manually added is not used in that command prompt. After using the ordinary command prompt, things started working and I got a *.vcproj file that Visual Studio could open.
    When I compile my project in Visual Studio I get an error like ".........cannot open input file 'c:\Program\Qt\4.3.2\lib\qtmaind.lib'". There are no such file on my system. How do I get it?
    I think it has something to do with "nmake", but I have not been able to run it with any success yet.
    Thanks in advance for the help!

  14. The following 2 users say thank you to TopFuel for this useful post:


  15. #8
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Open source + MSVC++ 2008

    Compile your app in release mode. Qt open source does not come with the debug libraries compiled. You have to build them yourself. There's even a shortcut in the start menu for that.

    Anyway, I suggest to drop VC 2008 and use Eclipse CDT + Qt Eclipse Integration + mingw. The only drawback is that gcc is a bit slower than mscc but that won't kill you.
    On the bright side, you will work with a professional IDE and release yourself from MS crap.

  16. The following 2 users say thank you to marcel for this useful post:


  17. #9
    Join Date
    Jan 2006
    Posts
    5
    Thanked 10 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Open source + MSVC++ 2008

    Compiling the app in release mode in VS2008 results in an error "cannot open input file "c:\Program\Qt\4.3.2\lib\qtmain.lib". There are no such file in my system either.

    When I run the "Qt 4.3.2 (Build Debug Libraries)" from the Windows start menu, it says that QMAKESPEC is win32-g++ and I don't get any chance to change it either, so no *.lib files are created by running that.

    I downloaded and installed the qt-win-opensource-4.3.2-mingw.exe file. Was that a mistake?
    Should I have downloaded the sources instead?

  18. The following 2 users say thank you to TopFuel for this useful post:


  19. #10
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Open source + MSVC++ 2008

    I downloaded and installed the qt-win-opensource-4.3.2-mingw.exe file. Was that a mistake?
    Should I have downloaded the sources instead?
    Yes it was. That version is for mingw only. you cannot use it with msvc.
    If you really need to, then download the sources and build them. that will take some time but it will work.
    When you configure the build make sure you select debug and release.

    After the build and install are complete you will have to set the following env vars:
    -QTDIR=your qt dir
    -PATH=%PATH%;%QTDIR%\bin;
    -QMAKESPEC=win32-msvc or whatever is called(maybe you'll even have to tweak it a bit, since there's no support for 2008 yet).

    BTW: I am very happy to see your interest in Eclipse & open source tools.

  20. The following 2 users say thank you to marcel for this useful post:


Similar Threads

  1. Replies: 3
    Last Post: 7th October 2015, 20:43
  2. How to intall both qt open source and coin3d
    By kaydknight in forum Installation and Deployment
    Replies: 2
    Last Post: 4th February 2007, 16:28
  3. Qtopia 4.2 Open Source edition released!
    By lpotter in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 21st December 2006, 21:45
  4. Licencing issue with Qt Open source
    By thepasty in forum General Discussion
    Replies: 16
    Last Post: 26th July 2006, 15:56
  5. Replies: 11
    Last Post: 24th March 2006, 07: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.