Qt Vs Tools Project creation failing for Linux (SSH|WSL)
-
Hi,
I'm trying to create a Qt Project using the Qt Vs Tools with the Linux WSL target.
I have configured the target like this:

If Ithen go ahead and create a New Project > Qt Widgets Application (or Console Application) and set the configurations up as followed

I get the following error when I complete the wizard:

As the error message kind of implies that it's trying to lookup the linux path on the C: drive I'm inclined to believe that I'm doing something wrong but I'm unable to figure out what exactly that is, considering that a) using the 6.11.1_msvc2022_64 config works and b) creating a non-Qt cmake project for WSL use also works.I have verified that Qt is actually installed in the WSL instance in the /opt/Qt/6.11.1 directory and that the /opt/Qt/6.11.1/gcc_64/mkspecs/qconfig.pri file actually exists. I have also made sure that /mnt/opt is symlinked to /opt.
Am I missing something or is this just generally broken?
Any help would be greatly appreciated.
-
Make sure that /mnt/opt is indeed mapped as a symlink before creating the kit (not just before the build), and if that doesn't help — completely bypass the Qt VS Tools Project Wizard to create the project as a regular CMake and add the Qt dependencies manually in CMakeLists.txt. It seems that the bug is specifically in the wizard component and not in the plugin's ability to work with WSL.
-
C Christian Ehrlicher moved this topic from General and Desktop
-
I have prodded the wizard some more and found the following:
- If you take the above config and remove the Debug Configuration it successfully created the project. (Although there's some issues when compiling)
- Setting the build system to "CMake Project for Qt" always fails with "Object reference not set to an instance of an object." once a linux target is selected
- The with the project created for WSL Visual Studio complains that this is targetting WSL1 and that the QT Installation path isn't set correctly
So yeah I guess I'll have to this very diffently than expected