QGroundControl "No such file or directory" problem.
-
Hi,
Sorry for asking about (probably) a rudimentary issue.
I will be conducting QGroundControl customizing, so I started studying about QT.
But it's a mess from the beginning. First of all, it cannot be compiled.
The compiler (or linker) can't find the [mavlink_type.h] file. I tried adding a full path, and then the same thing happened for several different headers in libs.
Eventually, once I specified the full path in every header, another error started to occur, and I want to solve this part later. First of all, since the current state is not normal.
I tried various ways to reinstall QT or update the submodule, but it didn't work.
QGroundControl installed not only the master version but also the 4.3 Stable version. Also tried various versions such as QT 6.6.2, 6.6.1, and 5.15.2, but the same problem always occurred.
I don't even know how this can happen in the first place. QT Creator, as you can see from the hint window, obviously knows the location of header, but compiler is not...
What should I try next? I want answers.
-
@JoeCFD I've redownloaded submodules (init sync update) and checked that the mavlink_types.h file is actually in place several times. It can also be opened in QT Creator or Visual Studio. Only when compiling does the compiler pretend the file doesn't exist. It's probably not found.
-
@MaverickT The required version of Qt is 6.6.1 (only).
https://docs.qgroundcontrol.com/master/en/qgc-dev-guide/getting_started/ -
@MaverickT said in QGroundControl "No such file or directory" problem.:
Only when compiling does the compiler pretend the file doesn't exist. It's probably not found.
The compiler is not pretending it does not exist; it actually does not exist in any of the places the compiler has been told to look.
Discard your shadow build directory.
Using Qt 6.6.1 only.
Runqmake
only and closely inspect the messages output in the "Compile Output" pane in Creator . There are several related to Mavlink.
If the issue is not obvious, then copy and paste the entire text output from here (use the code </> tool). Do not post a screen shot. -
@ChrisW67 said in QGroundControl "No such file or directory" problem.:
The compiler is not pretending it does not exist; it actually does not exist in any of the places the compiler has been told to look.
You are right. Program can't lie, so I must have done something wrong anyway. Here's part of the trial and error I've been through.
- QGCExternalLibs.pri has the path but it does not work. So I tried to change <mavlink_types.h> to <libs/mavlink/include/mavlink/v2.0/mavlink_types.h>.
- Then, the same error occurs in other headers in sub-directories of libs such as <shapefill.h> etc..
- If all ExternalLibs include headers are changed to full path, an LNK2019: Unsolved External Symbol error occurs at the time of link. Obviously, the path problem cannot be avoided.
- So I added
message($$INCLUDEPATH)
before and afterinclude(QGCExternalLibs.pri)
and find out there was no change. - But other includes like
include(QGCCcommon.pri)
seemes OK. I tried putting amessage("foo_bar_blah.pri START")
command in start of various pri, but only QGCExternalLibs.pri START was not printed. Why??? - I don't know why, but anyway, I put everything in QGCExternalLibs.pri inside qgroundcontrol.pro instead of
include(QGCExternalLibs.pri)
. And finally...!
10:54:12: The process "C:\Qt\Tools\QtCreator\bin\jom\jom.exe" exited normally. 10:54:12: Starting: "C:\Qt\Tools\QtCreator\bin\jom\jom.exe" C:\Qt\Tools\QtCreator\bin\jom\jom.exe -f Makefile.Debug link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\qgroundcontrol.exe @C:\Users\USER\AppData\Local\Temp\qgroundcontrol.exe.11892.0.jom LINK : warning LNK4001: 개체 파일이 지정되지 않았습니다. 라이브러리가 사용됩니다. LINK : warning LNK4068: /MACHINE이 지정되어 있지 않습니다. X64(으)로 기본 설정됩니다. LINK : error LNK2001: 확인할 수 없는 외부 기호 WinMainCRTStartup debug\qgroundcontrol.exe : fatal error LNK1120: 1개의 확인할 수 없는 외부 참조입니다. jom: C:\Users\USER\source\repos\build-qgroundcontrol-Qt_6_6_1-Debug\Makefile.Debug [debug\qgroundcontrol.exe] Error 1120 jom: C:\Users\USER\source\repos\build-qgroundcontrol-Qt_6_6_1-Debug\Makefile [debug] Error 2 10:54:12: The process "C:\Qt\Tools\QtCreator\bin\jom\jom.exe" exited with code 2. Error while building/deploying project qgroundcontrol (kit: Qt 6.6.1) When executing step "Make" 10:54:12: Elapsed time: 00:01.
- profit!...???
Can I say this is also a progress? I still don't know why only QGCExternalLibs.pri doesn't included. And I don't even know how to fix the new errors. I need to study more.
-
It was encoding problem.
I don't know why, but I think I'm having trouble reading QGCExternalLibs.pri on the Korean windows (maybe some of the other foreign languages windows).
It was unexpectedly difficult to find out because it was a problem that only occurred in one file.
Case closed. -