Error while adding a class to Qt creator project
-
Hi,
I want to add a class (.h and .cpp file) to my project in Qt creator and without any change to the auto-created files by Qt creator, I got this error whenever I 'build all' my project. (I clean all and then rebuild all).
[Makefile:402: liblogic.a] Error 1
('logic' is the name of my subproject where I add the class)
This problem doesn't happen if I remove the files from my project.
Also, I got these warnings:
"Makefile:3864: warning: overriding recipe for target 'moc_InputDataHandler.cpp'"
"Makefile:3200: warning: ignoring old recipe for target 'moc_InputDataHandler.cpp'"
"Makefile:11145: warning: overriding recipe for target 'InputDataHandler.o' "
"Makefile:10291: warning: ignoring old recipe for target 'InputDataHandler.o' "
('InputDataHandler' is the name of my class)
I'm working on Qt creator 5.13.0, Ubuntu 20. For more information, I use skycoder mvvm 13.0 in my project.
Any help will be appreciated. -
I don't know why, but it seems when I use Qt creator class definition tool, In my project's .pro file, In 'SOURCES' and 'HEADERS' part, it makes all .cpp and .h files except the two new files I've added to the project.
By commenting the code that excludes these files in .pro, problem solved.