mavlink / qgc-dev-guide

QGroundControl Developers Guide
https://dev.qgroundcontrol.com/en/
Other
42 stars 51 forks source link

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

Open ukb1 opened 1 year ago

ukb1 commented 1 year ago

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 commented 1 year ago

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

hamishwillee commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

@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