Hope Someone Can Help Me – Failed to Compile QGC Master on Windows 10 with Qt 6.8.2

I ran the following commands:
git clone --recursive -j8 GitHub - mavlink/qgroundcontrol: Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
cd D:\qgroundcontrol
git submodule update --recursive

I have installed:

  • gstreamer-1.0-devel-msvc-x86_64-1.18.6.msi
  • gstreamer-1.0-msvc-x86_64-1.18.6.msi

System environment variable:

  • GSTREAMER_1_0_ROOT_MSVC_X86_64 = C:\gstreamer\1.0\msvc_x86_64

    I keep failing to compile QGC Master. I would really appreciate any help.

Hii, There’s no need to install GStreamer separately, as it is automatically included with QGroundControl.

If not installed, an error will occur.

C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake:233: error: Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)

Reason given by package: The command
  "C:/gstreamer/1.0/msvc_x86_64/bin/pkg-config.exe" --dont-define-prefix --define-variable=prefix=C:/gstreamer/1.0/msvc_x86_64 --define-variable=libdir=C:/gstreamer/1.0/msvc_x86_64/lib --define-variable=includedir=C:/gstreamer/1.0/msvc_x86_64/include --version
failed with output:

You don’t need to add those paths to the environment variable. Instead, just delete the QGC and then re-clone it.

I need the Windows version, not the Android version.
I am using MSVC 2022.

Apologies for the confusion earlier. I originally mentioned the error while working on Android, but I encountered the same issue while working on Windows as well. By the way, did you download the GStreamer development installer?

Yes, I downloaded and installed gstreamer-1.0-devel-msvc-x86_64-1.18.6.msi and gstreamer-1.0-msvc-x86_64-1.18.6.msi. I also tried versions 1.22.6 and 1.24.6, but none of them worked.

If you know where the GStreamer folder is located, simply add to your system’s environment variable PATH.

“E:\gstreamer\1.0\msvc_x86_64\bin” like this and this is my path.

trust me it will work.

I have already added the environment variable.
If the system cannot find GStreamer, it will show this error: missing: PKG_CONFIG_EXECUTABLE.

this one is present or not in your folder?

  • Apply the Changes:
  • Click OK in all windows to confirm the changes.
  • Make sure to close and reopen any command prompt or terminal windows for the changes to take effect.
  • Verify the Update:
  • Open a Command Prompt and run the command:

pkg-config --version

You should see the version number, confirming that pkg-config is correctly set up. clean and rebuild.
After ensuring that pkg-config is available and configured correctly, try running your CMake build again. If the issue was related to pkg-config not being found, it should now be resolved.

My issue is with the initial problem, not with pkg-config not being found. The error about pkg-config only appears when GStreamer is not installed. I just want to emphasize that I have installed GStreamer, which is why I am not seeing the “pkg-config not found” error.
I already downloaded and installed gstreamer-1.0-devel-msvc-x86_64-1.18.6.msi and gstreamer-1.0-msvc-x86_64-1.18.6.msi. I also tried versions 1.22.6 and 1.24.6, but none of them worked.