Linux QtCreator 编译报错:No rule to make target '.../***' needed by '***.o'.stop
时间: 2023-07-19 22:54:02 浏览: 72
这个错误通常是由于 QtCreator 无法找到对应的文件导致的。你需要检查一下你的项目文件(比如 .pro 文件)中是否正确地包含了需要编译的文件,以及这些文件是否存在于你的项目目录中。
此外,你也需要检查一下你的项目的构建配置,确保编译器和目标平台等设置都正确配置。如果你使用的是外部库,还需要检查一下这些库是否正确地链接到了你的项目中。
如果你仍然无法解决问题,可以尝试清除项目并重新构建,或者查看编译器输出的详细信息以获取更多的帮助。
相关问题
:-1: error: No rule to make target '../QCustomPlot', needed by 'debug/QCustomPlot.o'. Stop.
这个错误通常是由于项目文件中缺少对应的依赖库引起的。在你的项目文件中检查是否正确地包含了 QCustomPlot 库,并且库文件的路径是否正确。如果你使用的是 Qt Creator,可以在项目的.pro 文件中添加以下内容:
```
INCLUDEPATH += /path/to/QCustomPlot
LIBS += -L/path/to/QCustomPlot -lqcustomplot
```
其中 `/path/to/QCustomPlot` 应替换为你的 QCustomPlot 库的路径。如果你已经正确地引用了 QCustomPlot 库,但仍然遇到此错误,你可以尝试重新编译 QCustomPlot 库并确保其正确构建。
:-1: error: No rule to make target 'playerwindow.cpp', needed by 'debug/playerwindow.o'. Stop.
这个错误通常是由于Qt Creator找不到playerwindow.cpp文件导致的。你可以尝试以下几个步骤来解决这个问题:
1. 确认playerwindow.cpp文件是否存在于项目文件夹中。如果不存在,请将其添加到项目中。
2. 确认playerwindow.cpp文件是否正确命名。如果文件名与代码中的文件名不匹配,则可能会导致编译错误。
3. 确认playerwindow.cpp文件是否被正确地包含在项目中。你可以检查.pro文件中是否包含了这个文件,或者在Qt Creator的“项目”视图中检查是否包含了这个文件。
4. 如果以上步骤都没有解决问题,你可以尝试重新生成项目文件。你可以在Qt Creator的“构建”菜单中选择“清理项目”和“运行qmake”来重新生成项目文件。
希望这些步骤可以帮助你解决这个问题。如果还有其他问题,可以继续向我提问。
阅读全文
相关推荐














