c++ - Makefile 没有创建可执行文件。是否包含导致错误的 .txt 文件?
问题描述
对于我正在学习的课程,我们正在学习使用 Makefile。我的问题是当我完全运行我的文件时,我在编译器中收到一个错误,让我知道我的文件无法清理并且没有目录。我已经在没有 .txt 文件的情况下运行了很多次,但仍然没有找到相关文件的目录。我查看了 GNU 指南,但没有看到 .txt 文件的示例,所以我想知道这是否是问题所在。我的makefile代码如下
CXX = g++ # the compiler
CXXFLAGS = -std=c++17 -Wall # flags for the compiler (use c++17 standards, turn on all optional warnings);
all: main
main: pe3_references.cpp
$(CXX) $(CXXFLAGS) pe3_bash.txt pe3_references.cpp main
clean:
rm main
这是 pe3_bash.txt 文件。只是答案。
1. pwd
2. vim empty.txt
3. ls empty*
4. ls *.txt | wc -l
5. echo "Tj Mmorosa" > empty.txt
6. mv empty.txt notempty.txt
7. mkdir pe3_bash
8. cd pe3_bash
9. mkdir pe3_bash_number2
10. cd pe3_bash_number2
11. Up key shows previous inputs to terminal
12. Down key moves in reverse direction of inputs to terminal
13. ctrl+r is used to search previous commands
14. 1)vim empty.txt
nano empty.txt
2) :wq (for vim)
ctrl+x (for nano)
3) :q (vim)
ctrl+x (nano)
15. Command line text editors are quicker and easily accessible.
*/
在此处输入图像描述, 我将不胜感激。(顺便说一句,我只有一个 pe3_references.cpp、pe3_bash.txt 和 Makefile 文件,如果有帮助的话)
解决方案
推荐阅读
- django - 使用带多选的中间表与管理员的 Django M2M 关系问题
- c# - 创建一个名称为目录路径的新文件
- rest - Rest 或 RestQL 或 Falcor 或 GraphQl
- c# - 如何将 swagger 与 Azure Active Directory OAuth 集成
- swift - window.windowController 在 windowWillClose() 内为零,但不在 viewDidAppear() 内
- angular - 角度“as”关键字实际上在做什么?
- c++ - 我如何判断一个类型是否是函子?
- vb.net - MaskedTextBox 和 DateTimePicker 仍然不支持 Nullable 日期?
- javascript - 解析动态 JSON 对象
- javascript - 如何修复在下拉列表中传递两个参数