运行附件脚本时,出现错误“ gcc:致命错误:无输入文件”。我不知道问题出在哪里。有谁知道如何让gcc读取文件?
我在Windows Bootcamp分区中使用Linux控制台bash。 我的桌面中的所有文件都保存在OneDrive中。
javib@DESKTOPF894E1N:/mnt/c/Users/javib/OneDrive/Escritorio/P02_E04/P02_E04$ ./script_4.sh
./script_4.sh: line 2: $'\r': command not found
: No such file or directory
gcc: fatal error: no input files
compilation terminated.
: No such file or directory
gcc: fatal error: no input files
compilation terminated.
: No such file or directory
gcc: fatal error: no input files
compilation terminated.
: No such file or directory
gcc: fatal error: no input files
compilation terminated.
: No such file or directory
gcc: fatal error: no input files
compilation terminated.
gcc: error: stack_fp.o: No such file or directory
gcc: error: eleint.o: No such file or directory
gcc: error: p2_e4.o: No such file or directory
gcc: error: node.o: No such file or directory
gcc: error: graph.o: No such file or directory
: No such file or directory
gcc: fatal error: no input files
compilation terminated.
./script_4.sh: line 9: $'\r': command not found
valgrind: ./p2_e4: No such file or directory
#!/bin/bash
gcc -g -Wall -ansi -std=c99 -pedantic -c eleint.c
gcc -g -Wall -ansi -std=c99 -pedantic -c stack_fp.c
gcc -g -Wall -ansi -std=c99 -pedantic -c node.c
gcc -g -Wall -ansi -std=c99 -pedantic -c graph.c
gcc -g -Wall -ansi -std=c99 -pedantic -c P02_E04.c
gcc -g -Wall -ansi -std=c99 -pedantic -o p2_e4 stack_fp.o eleint.o p2_e4.o node.o graph.o P02_E04.o
valgrind --leak-check=full ./p2_e4 "g1.txt" 1 3
C:\Users\javib\OneDrive\Escritorio\P02_E04\P02_E04
(All the files are in this directory.)