- 论坛徽章:
- 0
|
操作系统:SunOS 5.8
bash-2.03# gcc --version
gcc (GCC) 3.4.2
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
bash-2.03#
代码a.c
- main()
- {
- printf("a
- sdf");
- }
复制代码
bash-2.03# gcc a.c
a.c: In function `main':
a.c:3: error: missing terminating " character
a.c:4: error: missing terminating " character
a.c:5: error: `sdf' undeclared (first use in this function)
a.c:5: error: (Each undeclared identifier is reported only once
a.c:5: error: for each function it appears in.)
a.c:5: error: parse error before '}' token
bash-2.03#
如果将代码改为:b.c
- main()
- {
- printf("asdf");
- }
复制代码
就能正常编译了。
请问各位高手,如何在不改代码的情况下,正确编译,上述的a.c |
|