No rule to make target 'debug/file.moc'
-
error:
No rule to make target 'debug/codeeditor.moc', needed by 'debug/codeeditor.o'. Stop.
error after:
adding namespaces and moving CodeEditorSidebar from common file to own file.https://gist.github.com/borneq/e1fab5778648fee5099b7ce16abccc7e
-
Hi
Did you try to delete the build directory ?
Those errors sometimes comes from cached qmake files.
-
I return to correct version on git and then only moved CodeEditorSidebar to own file, and have erorrs:
D:\wazne\github_my\qteditor_tmp\build-qedytor-Desktop_Qt_5_12_0_MinGW_64_bit-Debug\debug\moc_codeeditorsidebar.cpp:58: error: multiple definition of `CodeEditorSidebar::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)'D:\wazne\github_my\qteditor_tmp\build-qedytor-Desktop_Qt_5_12_0_MinGW_64_bit-Debug\debug\moc_codeeditorsidebar.cpp:76: error: multiple definition of `CodeEditorSidebar::metaObject() const'
....
BUT after deleting build direcotory still error: :-1: błąd: No rule to make target 'debug/codeeditor.moc', needed by 'debug/codeeditor.o'. Stop.Previous was a bit odd: both class declaration and methods definitions was in *.cpp file. If I move class declaration to *.h is error
Both classes are mutual dependend.
-
Hi,
Remove
#include "codeeditor.moc"
from codeditor.cpp. You don't need it since you have now each class in their own header file.