我每次都会收到此错误,但我不知道发生了什么......有人可以帮忙吗?
@Mike Kinghan这是新的错误
08:21:40 **** Incremental Build of configuration Debug for project 5exe ****
make all
Building file: ../5exe.c
Invoking: GCC C Compiler
gcc -I"C:\Users\Dylan Galea\workspace\5\source" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"5exe.d" -MT"5exe.o" -o "5exe.o" "../5exe.c"
../5exe.c: In function 'main':
../5exe.c:42:10: warning: variable 'temp' set but not used [-Wunused-but-set-variable]
char temp; //temporary storage to remove the extra ( character
^
Finished building: ../5exe.c
Building target: 5exe.exe
Invoking: MinGW C Linker
gcc -L"C:\Users\Dylan Galea\workspace\5\Debug -o "5exe.exe" ./5exe.o -l5
/usr/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
makefile:29: recipe for target '5exe.exe' failed
make: *** [5exe.exe] Error 258
08:21:40 Build Finished (took 463ms)
答案 0 :(得分:0)
你的源代码(你没有发布)有一个未终止的字符串文字,比如
printf("example text %d with an integer , 4);
/* ^ missing `"' /*
答案 1 :(得分:0)
反斜杠(' \')是shell(/usr/bin/sh
)的转义字符。所以在这一行:
gcc -I"C:\Users\Dylan Galea\workspace\5\source\" -O0 -g3 -Wall -c -fmessage- length=0 -MMD -MP -MF"5exe.d" -MT"5exe.o" -o "5exe.o" "../5exe.c"
反斜杠' \'在source
之后,转义以下"
和字符串
"C:\Users\Dylan Galea\workspace\5\source\"
被解析为具有不平衡的引号。
执行以下操作之一:
逃避反斜杠: -
-I"C:\\Users\\Dylan Galea\\workspace\\5\\source\\"
用正斜杠替换它们:
-I"C:/Users/Dylan Galea/workspace/5/source/"