gcc:fatal error:no input files complication terminated
时间: 2023-05-12 11:03:35 浏览: 243
这个错误通常是因为没有指定输入文件导致的。您需要在命令行中指定要编译的源文件,例如:
gcc main.c -o main
其中,main.c 是您要编译的源文件,-o main 是指定输出文件的名称为 main。
相关问题
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".
gcc:fatal error:no input files
这个错误通常是由于在编译时没有指定要编译的源文件或者源文件不存在所导致的。你可以检查一下你的编译命令是否正确并且输入的源文件路径是否正确。比如,如果你想编译一个名为 test.c 的源文件,你应该在命令行中输入:
```
gcc test.c -o test
```
其中,`-o` 选项指定编译输出的可执行文件名为 `test`。如果你的源文件名不是 `test.c`,那么你需要将命令中的 `test.c` 替换成你的源文件名。
如果你确定命令和源文件路径都没有问题,那么这个错误可能是由于你的编译系统出现了问题。你可以尝试重新安装你的编译环境或者使用其他的编译工具来编译你的代码。
相关推荐
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)