Results 1 to 8 of 8

Thread: Qt5 and Visual Studion 2022

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,330
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 and Visual Studion 2022

    No worries. I am using Qt 5.14.2 built with VS 2015 for development with VS 2022. Since about VS 2015, Microsoft made all binaries compiled with the "Platform toolset" parameter set to "v14x" (where "x" is 0 - 3 currently) compatible with each other. So you can link a v140 binary with a v143 binary and all works fine.

    Capture.jpg

    I did run into a few glitches. For one, it took hours to build because I did not exclude the examples and there are hundreds of them. It also failed building qtdeclarative (part of QML) because it could not find python. Once I added that to my PATH and reopened the command prompt, that part built. It failed again somewhere further down the line, but all of the major libraries had been built. If I ever do this again for real I will set up a .bat file with an appropriate set of features to build instead of having it build everything. For my desktop app development, I don't use much beyond the core set of functionality.

    Edit March 29 2023:

    I had to build Qt 5.15 from source because of another project that required that version. I used VS 2022 for the build and followed the steps above. To make it a bit easier, I wrote a little one-line .bat file to start the configuration process:

    Qt Code:
    1. ..\src\configure -opensource -prefix C:\Qt\5_15_3\5.15.3\msvc2022_64 -nomake examples -nomake tests -skip qtwebengine -skip qtconnectivity
    To copy to clipboard, switch view to plain text mode 

    After configuring, I started the build in the evening and it was done without errors by the next morning. "nmake install" copied the appropriate files to the "prefix" (install) directory.

    When I tried to build the docs (nmake docs) it failed because for some reason dqoc.exe was not built (even though assistant.exe was). So I copied qdoc.exe from my previous Qt5 install into the new install bin directory and all worked fine. There is probably a configure option to fix that.
    Last edited by d_stranz; 29th March 2023 at 16:46.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 2
    Last Post: 5th March 2021, 22:57
  2. Using Qt 5.4.1 Visual Studio 2013 libs in Visual Studio 2010
    By ^NyAw^ in forum Installation and Deployment
    Replies: 0
    Last Post: 6th March 2015, 10:20
  3. ms visual c++ compile without ms visual studio
    By zzz9 in forum General Programming
    Replies: 2
    Last Post: 12th August 2012, 20:29
  4. How to find if Visual Studion 2008 installed
    By sawerset in forum Newbie
    Replies: 1
    Last Post: 7th December 2008, 18:28
  5. qt in Visual Studion
    By sanjayk in forum Qt Programming
    Replies: 2
    Last Post: 25th November 2008, 09:44

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.