Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 没有规则使目标`–;f';_Linux_Makefile_Terminal_Remote Server - Fatal编程技术网

Linux 没有规则使目标`–;f';

Linux 没有规则使目标`–;f';,linux,makefile,terminal,remote-server,Linux,Makefile,Terminal,Remote Server,我正在尝试制作一个c文件,如 make –f makefile1 这是我的制作文件: TestAssn1: test_assign1_1.o dberror.o storage_mgr.o cc -o TestAssn1 test_assign1_1.o dberror.o storage_mgr.o test_assign1_1.o: test_assign1_1.c test_helper.h dberror.h storage_mgr.h cc -c te

我正在尝试制作一个c文件,如

make –f makefile1
这是我的制作文件:

TestAssn1: test_assign1_1.o dberror.o storage_mgr.o
        cc -o TestAssn1 test_assign1_1.o dberror.o storage_mgr.o
test_assign1_1.o: test_assign1_1.c test_helper.h dberror.h storage_mgr.h
        cc -c test_assign1_1.c
dberror.o: dberror.c dberror.h
        cc -c dberror.c
storage_mgr.o: storage_mgr.c storage_mgr.h dberror.h
        cc -c storage_mgr.c
但我只得到这个信息:

make: *** No rule to make target `–f'.  Stop.

我应该如何纠正这个问题?

这很奇怪,因为您的make用法是正确的

请尝试此选项的其他一些格式:

-f file, --file=file, --makefile=FILE  
    Use file as a makefile.   

否则,您的
make
可能不是该手册页中列出的版本(即GNU
make
)。

这很奇怪,因为您的make用法根据

请尝试此选项的其他一些格式:

-f file, --file=file, --makefile=FILE  
    Use file as a makefile.   

否则,您的
make
可能不是该手册页中列出的工具(即GNU
make
)。

您需要在命令中使用一个普通破折号(
-
),而不是一个


我猜您是从博客或其他web源复制了此命令。许多博客/网络框架都有一个缺陷,它们会用排版正确的标点符号替换打字机标点符号,即使在代码格式的文本中也是如此。

您需要在命令中使用普通破折号(
-
),而不是一个


我猜您是从博客或其他web源复制了此命令。许多博客/网络框架都有一个缺陷,它们会用排版正确的标点符号替换打字机标点符号,即使在代码格式的文本中也是如此。

在您的shell环境中是否有一个名为
make
的别名或函数。你必须非常努力才能得到那个错误。事实上,我不知道你是怎么做到的。我最近的方法是键入
make-f-f
,这会产生两行输出:
make:-f:没有这样的文件或目录
make:**没有规则将目标设置为“-f”。停止。
在您的shell环境中是否有名为
make
的别名或函数。你必须非常努力才能得到那个错误。事实上,我不知道你是怎么做到的。我最近的方法是键入
make-f-f
,这会产生两行输出:
make:-f:没有这样的文件或目录
make:**没有规则将目标设置为“-f”。停止。