Results 1 to 2 of 2

Thread: Qt, Windows, STL and headaches

  1. #1
    Join Date
    May 2008
    Location
    Tokyo
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qt, Windows, STL and headaches

    I'm having quite a time trying to get Qt and Visual C++ to place nice. I have a fully functional windows C++ console app that I want to convert into a Qt GUI app. My app needs to use some Windows libraries, such as setupapi.lib, so it can talk to some hardware.

    I tried using Qt Creator first, but MingW complained about files from the Windows SDK (i.e. winnt.h) due to inline assembly, compiler-specific macros and what not. Also, my app using std::wstringstream, which MingW doesn't seem to support.

    So I then complied Qt with Visual C++, but now the std::wstringstream problem does not go away. This has lead me to believe that when I execute the following,

    Qt Code:
    1. C:\Project> qmake
    2. C:\Project> nmake
    To copy to clipboard, switch view to plain text mode 

    The make file generated by qmake seems to be point Microsoft's nmake to the MingW version of the STL libraries. Unfortunately I'm not quite savvy enough with Qt to know how to get it to stop doing that.

    Has anyone run into this problem before? Any ideas?

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt, Windows, STL and headaches

    Should be as simple as specifying the proper mkspec e.g :
    qmake -spec win32-msvc
    Quick list of mkspec you may try to work with MSVC :

    • win32-msvc
    • win32-msvc.net
    • win32-msvc2002
    • win32-msvc2003
    • win32-msvc2005
    • win32-msvc2008

    Note that you can find the valid mkspec names in the mkspecs directory of your Qt installation.
    Current Qt projects : QCodeEdit, RotiDeCode

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.