How to convert a Visual Studio project to use Qt VS Tools
-
wrote on 19 Oct 2022, 15:52 last edited by
Using VS2019 and VS Tools 2.9.1 Rev. 6.
I have a number of Visual Studio projects which I need to modify or convert to use Qt VS Tools.
What is the correct approach to achieve this. I've seen conflicting reports of how it should be done on Stack Overflow, so felt I needed to come here to get the correct procedure.
Many thanks
David -
You've already asked that :) Convert Visual Studio 2017 Solution to use Qt
Should be similar for the newer versions. There's no officially supported procedure, so there's no "correct" way to do it. Only what works for you.
-
wrote on 20 Oct 2022, 00:21 last edited by
Oh dear how the memory fails as you get older.
-
Hah, a couple of times now I was looking for some information and found my own post giving that information to someone couple years earlier. Yup, human brains don't age well.
-
wrote on 20 Oct 2022, 00:43 last edited by
Well I did this:
<PropertyGroup Label="Globals"> <SccProjectName /> <SccLocalPath /> <Keyword>QtVS_v302</Keyword> <ProjectGuid>{1747F255-9CB9-472B-8FEE-9E0BBFBAD49D}</ProjectGuid> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> </PropertyGroup>
reloaded the project and did the Extensions/Qt VS Tools/Convert custom build steps..
and got:
😦
David -
The version of the Qt VS Tools extension changed since then. Currently it's
QtVS_v304
. Try that, it works for me.
Also make sure you have your solution selected in solution explorer when you run that option. -
wrote on 20 Oct 2022, 01:34 last edited by
I tried that and still got the same message.
The project in question builds a static library (that may be relevant).
I did manage to convert a command line project, but when I tried to build it I got:
2>------ Build started: Project: DeepSkyStackerCL, Configuration: Release x64 ------
2>C:\Users\amonra\AppData\Local\QtMsBuild\qt_vars.targets(68,5): error : There's no Qt version assigned to project DeepSkyStackerCL.vcxproj for configuration Release/x64.
2>C:\Users\amonra\AppData\Local\QtMsBuild\qt_vars.targets(68,5): error : Please set a Qt installation in 'Project|Properties|Configuration Properties|Qt Project Settings|Qt Installation'.
2>Done building project "DeepSkyStackerCL.vcxproj" -- FAILED.And yes the Qt Installation IS set:
-
I guess something must've changed. That's the problem with unsupported processes.
Well, the easiest, I think, would be to create a basic working Qt project using a wizard and compare the .vcxproj files looking for Qt related stuff. -
wrote on 20 Oct 2022, 09:05 last edited by
I tried that and manually inserted the relevant Qt stanzas into the first project but when I opened the settings in VS the first one refused to recognise the Qt stuff.
The second project seems fine but still refuses to build as I posted.
8/9