Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Doc Bug: Code Submission · QGroundControl Developer Guide QGC does not work correctly when built with cmake on windows #166

Open
ukb1 opened this issue Jan 3, 2023 · 6 comments

Comments

@ukb1
Copy link

ukb1 commented Jan 3, 2023

DESCRIBE PROBLEM WITH DOCS HERE

Bug Page: Code Submission · QGroundControl Developer Guide

OS: Windows 10
QT Version: 5.15.2
Hi,
I tried to compile with both qmake and cmake on QGC Qt Creator.
When I compiled it with qmake, the codes compiled correctly. But when I try to compile with cmake it gives an error.
linux operating system is running. I think it's the bottom part.

if (WIN32) # append application icon resource for Windows set(QGC_RESOURCES ${QGC_RESOURCES} **${CMAKE_CURRENT_SOURCE_DIR}/windows/QGroundControl.rc)** endif()

Since there is no such path, it gives an error in the add_executable part. When switching to the win operating system, this part is opened.

${CMAKE_CURRENT_SOURCE_DIR}/windows/QGroundControl.rc) path should be fixed to ${CMAKE_CURRENT_SOURCE_DIR}/deploy/windows/QGroundControl.rc) so that cmake will run

Although it doesn't work as well as the result of compiling with qmake, at least cmake works on compiling.

Can this situation be controlled?

@serkanMzlm
Copy link

I did this too. It started working when I deleted the QtQuick.dll file in the build folder after compiling.

@hamishwillee
Copy link
Collaborator

@DonLakeFlyer Is there some kind of bug here for CMake? I don't want to update build instructions if this is a config issue.

@serkanMzlm
Copy link

serkanMzlm commented Jan 4, 2023

@DonLakeFlyer Is there some kind of bug here for CMake? I don't want to update build instructions if this is a config issue.

yes, I think there is a bug in the cmake part.

When I compile with qt creator, it works fine on the qmake side, but when I build with cmake, it gives an error.
I think the error is due to the wrong file path.
so on line 192 of the main cmake file
I changed the code ${CMAKE_CURRENT_SOURCE_DIR}/windows/QGroundControl.rc) to ${CMAKE_CURRENT_SOURCE_DIR}/deploy/windows/QGroundControl.rc)

successfully built but gave QtQuict errors at runtime
For this issue I deleted the QtQuick.dll file in the build folder. The reason I do this is because it finds the Qt5QtQuick.dll file directly on the system. it worked like this

Note: in the same way, when I did it on Linux, it was working without any errors. I wanted to continue on windows and I got these errors on the windows side.

I encountered many more errors, now I am trying to solve them

I do git clone --recursive -j8 https://github.com/mavlink/qgroundcontrol.git to download the code

@ukb1
Copy link
Author

ukb1 commented Jan 4, 2023

@DonLakeFlyer Is there some kind of bug here for CMake? I don't want to update build instructions if this is a config issue.

It gives an error when building with cmake in Windows operating system

@hamishwillee
Copy link
Collaborator

@DonLakeFlyer Can you comment/offer fix?

@DonLakeFlyer Is there some kind of bug here for CMake? I don't want to update build instructions if this is a config issue.

It gives an error when building with cmake in Windows operating system

@ukb1 Yes. I'm hoping Don can offer a fix or an ETA or a suggestion. I don't want to debug this - right now AFAIK it is a QGC bug, not a docs bug. My only interest is the docs, and I don't want to patch the docs to "cover up" a toolchain bug.

@ukb1
Copy link
Author

ukb1 commented Jan 25, 2023

@DonLakeFlyerYorum / düzeltme önerebilir misiniz?

@DonLakeFlyerBurada CMake için bir tür hata mı var? Bu bir sorunuysa, güncellemelerini güncellemek istemiyorum.

Windows işletim sistemini çalıştırırken hata veriyor.

@ukb1Evet. Don'un bir düzeltme, tahminin gerçekleşme süresi veya bir öneri sunabileceğini tahmin ediyoruz. Bu hatayı önlemek istemiyorum - şu anda AFAIK bu bir QGC hatası, bir dokümantasyon hatası değil. Tek ilgi alanım dokümanlar ve bir araç zinciri hatasını "örtbas etmek" için dokümanları yamalamak istemiyorum.

Overall I solved my problem and I'm still progressing thanks for your help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants