gcc: fatal error: no input files compilation terminated.
时间: 2024-01-01 22:05:19 浏览: 57
This error message is indicating that the gcc compiler was unable to find any input files to compile.
To fix this error, you need to specify the input file that you want to compile. This can be done by passing the filename as an argument to the gcc command. For example, if you wanted to compile a C file named "hello.c", you would run the following command:
gcc hello.c
If you have already specified the filename but are still getting this error, make sure that the file exists in the current directory and that you have permission to access it.
相关问题
gcc: fatal error: no input files compilation terminated.
This error message typically occurs when the GCC compiler is invoked without any input files to compile. In other words, you may have forgotten to specify the source code file(s) that you want to compile.
To fix this error, make sure that you provide the correct input files to the GCC compiler. For example, if your source code file is named "main.c", you can compile it by running the following command:
gcc main.c -o main
This will compile the "main.c" file and output the executable file named "main".
arm-linux-gnueabihf-gcc: fatal error: no input files compilation terminated.
这个错误提示表示编译器没有找到输入文件,可能是因为你没有指定要编译的源代码文件或者指定的源文件路径不正确。
请检查你的编译命令是否正确,例如:
```
arm-linux-gnueabihf-gcc source.c -o output
```
其中 `source.c` 是你要编译的源代码文件名,`output` 是输出文件名。如果你的源代码文件不在当前目录下,需要加上路径。
如果你确认编译命令正确无误,但仍然出现这个错误,可能是编译器工具链配置有误,请检查你的编译器工具链是否正确安装和配置。