当我为 Windows 编译我的 Qt 项目时,我收到以下 2 个警告:
Makefile.Debug:109: warning: overriding commands for target `debug/moc_mainwindow.cpp'
Makefile.Debug:106: warning: ignoring old commands for target `debug/moc_mainwindow.cpp'
我假设他们表明我的项目配置存在问题,问题是什么以及如何解决?
最佳答案
我曾经遇到过同样的错误,也许你的问题的来源不同,但我还是会写。 在我的 *.pro 文件中,它就像:
SOURCES += main.cpp\
mainwindow.cpp\
serialHelper.cpp \
serialHelper.cpp
HEADERS += mainwindow.h\
+= serialHelper.h \
serialHelper.h \
typeDefinitions.h
cpp 和头文件在重复。我删除了重复的包含并为我解决了问题。
关于c++ - Qt 编译器警告 : overriding commands for target/ignoring old commands for target,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4722400/