Visual Studio "Error: Undefined Interface" on header file then cause "QtRunWork" returned "false"
-
Hello,
I've been succesfully working on a project with Visual Studio and Qt VS tool extension for last months without any building issues.
After having accepted a small update on Qt Maintenance tool, my program can't build anymore.
I get an "Error: Undefined Interface" when proccess applies "moc ../{specific_file}.h" and generates a "QtRunWork has returned false".
This seems to be linked with the Qt Meta Object Compiler not finding the concerned header file... but I don't know what to do.
I've been trying to fix it for couple days now. -
C Christian Ehrlicher moved this topic from General and Desktop on
-
Hello,
I've been succesfully working on a project with Visual Studio and Qt VS tool extension for last months without any building issues.
After having accepted a small update on Qt Maintenance tool, my program can't build anymore.
I get an "Error: Undefined Interface" when proccess applies "moc ../{specific_file}.h" and generates a "QtRunWork has returned false".
This seems to be linked with the Qt Meta Object Compiler not finding the concerned header file... but I don't know what to do.
I've been trying to fix it for couple days now. -
Hi,
Can you provide a minimal sample code that reproduces this behaviour ?
-
I have some problem.
Build log:
1>moc Header.h
1> E:\Projects\QtUndefinedInterface\Header.h(9): Error: Undefined interface
1>C:\Users<cut>\AppData\Local\QtMsBuild\qt_work.targets(138,5): error MSB4181: The "QtRunWork" task returned false but did not log an error.VS Extension 3.3.1 (Visual Studio 2022)
https://www.dropbox.com/scl/fi/9tmqplwjdd8q7tyea7sw7/QtUndefinedInterface.zip?rlkey=tuo4iqg7vp0rjugvpajv6murg&st=pnsvx8ok&dl=0 -
I have some problem.
Build log:
1>moc Header.h
1> E:\Projects\QtUndefinedInterface\Header.h(9): Error: Undefined interface
1>C:\Users<cut>\AppData\Local\QtMsBuild\qt_work.targets(138,5): error MSB4181: The "QtRunWork" task returned false but did not log an error.VS Extension 3.3.1 (Visual Studio 2022)
https://www.dropbox.com/scl/fi/9tmqplwjdd8q7tyea7sw7/QtUndefinedInterface.zip?rlkey=tuo4iqg7vp0rjugvpajv6murg&st=pnsvx8ok&dl=0@m0xf Please read the documentation: https://doc.qt.io/qt-6/qqmlparserstatus.html#details
"To use QQmlParserStatus, you must inherit both a QObject-derived class and QQmlParserStatus, and use the Q_INTERFACES() macro."