Me and my group of students are trying to install the QGC to make our own interface above it. We are using Visual Studio 2017/2019 and have QT installed. We are getting a lot of errors such as CMake errors and also QTresources not being found.
Can someone help us out so we can continue?
We are also having an error about an QGroundControl.rc file missing that is being requested by line 204 in the file CMakeList.txt.
Have you followed the getting started instructions exactly?
QGC has very strict build requirements, so if you’re using an incorrect version of Visual Studio or Qt it likely won’t work. Also make sure you’ve updated the submodules in your cloned source directory, otherwise some of the required code will be missing.
If I’ve got some time tomorrow I’ll see if I can spin up a Windows VM and get building set up. Otherwise I’ll try to check early next week
QT we have the required 5.12.6 and the components we have selected are MSVC 2017 64 BIT, QT Charts, QT sources, Android ARMv7 (even tho we most likely won’t make Android version). And with Visual Studio we use the latest update on the 2017 one (15.9.4). With Visual Studio we also tried the 2019 one, again with the latest version (16.5.4).
We’ve also done the update for the submodules with the recursive command and fetched / pulled the master branch after that.
We managed to get a version running on QT Creator, but since this requires paid license it’s not suitable for our project.
Should I post the entire output we get when attempting to run?
Also thank you for replying so quick, as always. You’re great help.
edit; Added the Visual Studio Versions of both 2017 and 2019.
You can, although if it’s possible to post just the errors and warnings that may be easier for us to make sense of (at least initially). Whatever output you choose to post, please do so in a code block so it’s a bit easier to copy and/or navigate
Okay so big update! A teacher walked by and he asked us how it’s going and we told about our issue. He kinda confirmed the same as you did; that QT Creator is useable without a paid license and he showed one of us how it’s used. He “magically” got it working and told us we can use that instead of Visual Studio! (He is one of the guiding teachers for this project)
So no help needed anymore! We are now going to make a custom build (we already found the instructions on how to do that, I have faith it will go well ).
Altho it might still be interesting for others to solve the issue if they want to use Visual Studio
Severity Code Description Project File Line Suppression State
Error CMake Error at C:\Users\Mintie\source\repos\qgroundcontrol_test\qgroundcontrol\CMakeLists.txt:123 (find_package):
Could not find a package configuration file provided by "Qt5" (requested
version 5.15.0) with any of the following names:
Qt5Config.cmake
qt5-config.cmake
Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed. QGroundControl C:\Users\Mintie\source\repos\qgroundcontrol_test\qgroundcontrol\CMakeLists.txt 123
This is the current error we have affter some of our own trouble shooting.
We found that sudo apt-get install qtbase5-dev is being suggested but we use Windows and have no clue how to do it for Windows.
edit; It does say 5.15.0 here but that was required for QT Creator, we got this error at 5.12.6 as well.
Generally that’s solved by specifying the place where Qt is installed in your build configuration command. Assuming you’re using the Build using cmake on CLI instructions, I’d guess you’re running into this on step 3, and could solve it by calling something like the following:
We discussed this via DM and seem to have solved the issue.
Installation Instructions
The latest master was updated to Qt 5.15 very recently, and the build docs unfortunately haven’t yet been updated to match. On a fresh Windows machine, the steps I took were as follows:
Gone to File/Open and navigated to qgroundcontrol\qgroundcontrol.pro
Configured it as Qt 5.15 MSVC 2019 64-bit
Pressed the green play button to build and open
Perhaps of particular note are steps 8 through 11. Visual Studio (from step 2) is ONLY used for getting the relevant compilers (step 3). Actually building QGC should be done through Qt Creator.
Old Versions
If you for some reason happen to want to build an old version (instead of working off the latest master) then the relevant changes are
Clone the sources, but checkout the desired commit/tag/branch before updating submodules - f2d0b8c is the last commit the day before the Qt 5.15 changeover, and v4.1.4 is the last tag before it
…
Configured it as Qt 5.12.6 MSVC 2019 64-bit
for the old Qt 5.12.6 option)