#fatal error: QtCore/QObject: No such file or directory

1 messages · Page 1 of 1 (latest)

bold ember
#
kreij@LAPTOP-31E3HV7R MINGW64 ~/webots/src/webots
$ g++ -isystem /mingw64/lib/libzip/include -fno-ipa-cp-clone -O3 -DNDEBUG -Wall -Wpointer-arith -Wcast-align -Wwrite-strings -std=c++11 -D_USE_MATH_DEFINES -std=c++17 -DQT_NO_DEBUG -Wsuggest-override -Iapp -Icontrol -Icore -Iwidgets -Ieditor -Iengine -isystem external/siphash -Igui -Imaths -Inodes -Inodes/utils -Iplugins -Iscene_tree -Isound -Iuser_commands -Ivrml -Iutil -Iexternal/compilation_timestamp -I../../include/controller/c -Iode -isystem ../../include/ode -isystem /mingw64/include/qt6/QtCore -Ibuild/release -isystem /mingw64/include/qt6/QtGui -isystem /mingw64/include/qt6/QtWidgets -isystem /mingw64/include/qt6/QtPrintSupport -isystem /mingw64/include/qt6/QtOpenGL -isystem /mingw64/include/qt6/QtNetwork -I../../dependencies/lua-5.2.3/src -isystem ../../include/libOIS -I../../include/libpico -I../../include -Iwren -I/mingw64/include/freetype2 -isystem ../../src/stb -I../../dependencies  -isystem /mingw64/include/qt6/QtCore -MM -w nodes/utils/WbVisualBoundingSphere.cpp
In file included from nodes/utils/WbVisualBoundingSphere.cpp:15:
nodes/utils/WbVisualBoundingSphere.hpp:23:10: fatal error: QtCore/QObject: No such file or directory
   23 | #include "QtCore/QObject"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

but file exist?

kreij@LAPTOP-31E3HV7R MINGW64 ~/webots/src/webots
$ ls -l /mingw64/include/qt6/QtCore/QObject
-rw-r--r-- 1 kreij kreij 22 Oct 12 18:50 /mingw64/include/qt6/QtCore/QObject

I am using -isystem /mingw64/include/qt6/QtCore so why does it say file does not exist?

spare sandal
#

Instead of manually adding include directory, use pkgconfig or cmake or related things.

bold ember
#

oh no I am debugging

#

project uses make

#

so I am trying to figure out why it doesn't work

#

i am reproducing the error manually

#

oh

#

..

#

I got it

spare sandal
#

How did you fix it?

bold ember
#

instead of importing
/mingw64/include/qt6/QtCore
I import
/mingw64/include/qt6

#

what I don't get is how it the mantainers compiled it before...

spare sandal
#

What is "Import" here? Can you provide the proejct link?

bold ember
#

it's actually a cool app

#

it uses mingw to compile on windows

spare sandal
#

The #includeseems wrong here. It should be just #include <QObject>
Though projects are free to do anything.

#

Also, the include directory from pkgconfig output has QtCore.

$ pkgconf -cflags Qt5Core
-DQT_CORE_LIB -IF:/msys64/ucrt64/include/QtCore
bold ember
#

oh

#

maybe it's a bug

spare sandal
#

The repository seems popular, so it's not a bug - a feature 🥲

bold ember
#
kreij@LAPTOP-31E3HV7R MINGW64 ~/webots/msys64/mingw64/bin
$ file webots-bin
webots-bin: PE32+ executable (GUI) x86-64 (stripped to external PDB), for MS Windows, 13 sections

kreij@LAPTOP-31E3HV7R MINGW64 ~/webots/msys64/mingw64/bin
$ file /mingw64/bin/Qt6Xml.dll
/mingw64/bin/Qt6Xml.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows, 14 sections

kreij@LAPTOP-31E3HV7R MINGW64 ~/webots/msys64/mingw64/bin
$ export PATH=$PATH:/mingw64/bin

kreij@LAPTOP-31E3HV7R MINGW64 ~/webots/msys64/mingw64/bin
$ ./webots-bin
C:/Users/kreij/scoop/apps/msys2/2022-01-28/home/kreij/webots/msys64/mingw64/bin/webots-bin.exe: error while loading shared libraries: Qt6Xml.dll: cannot open shared object file: No such file or directory

How could I debug this? does this have to do with mingw path conversion?

spare sandal
#

export PATH=$PATH:/mingw64/bin Why? It's already in PATH.

bold ember
#

maybe at the end it did something? idk

#

just throwing stuff at the wall to see what sticks

spare sandal
#

The easiest way I found to use MSYS=winjitdebug environment value. Close any msys2 instance > Set that environment value > start msys2/mingw terminal > start program > there will be a window with the dll missing.

bold ember
#

thank you