相关疑难解决方法(0)

编译错误:在程序等中迷路'\ 302'

我在编译后面的漏洞利用代码时遇到问题:

http://downloads.securityfocus.com/vulnerabilities/exploits/59846-1.c

我正在使用:"gcc file.c"和"gcc -O2 file.c",但它们都会出现以下错误:

 sorbolinux-exec.c: In function ‘sc’:
 sorbolinux-exec.c:76: error: stray ‘\302’ in program
 sorbolinux-exec.c:76: error: stray ‘\244’ in program
 sorbolinux-exec.c:76: error: ‘t’ undeclared (first use in this function)
 sorbolinux-exec.c:76: error: (Each undeclared identifier is reported only  once
 sorbolinux-exec.c:76: error: for each function it appears in.)
Run Code Online (Sandbox Code Playgroud)

我尝试在Kali linux和Ubuntu 10.04上编译它们并得到相同的结果.

c compiler-construction

31
推荐指数
3
解决办法
13万
查看次数

C编译:错误:在程序中迷路'\ 4'; 八分流?

试图编译一堆.c文件

(1)文件编译正常,使用 cc

cc -Wall -Wextra -Wunreachable-code -ggdb -O0 *.c 
Run Code Online (Sandbox Code Playgroud)

(2)然后,我需要从最终输出创建一个静态库,以便在c ++程序中使用.所以我这样做:

ar cru liborientdb-c.a *.o
Run Code Online (Sandbox Code Playgroud)

(3)工作正常.但是,当我来编译包含第1行库的c ++程序testme.cpp时

(line 1 of testme.cpp)
#include "liborientdb-c.a"
Run Code Online (Sandbox Code Playgroud)

编译步骤:

cc testme.cpp
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

liborientdb-c.a:117:22: error: stray '\3' in program
liborientdb-c.a:117:263: warning: null character(s) ignored [enabled by default]
liborientdb-c.a:117:22: error: stray '\17' in program
liborientdb-c.a:117:265: warning: null character(s) ignored [enabled by default]
liborientdb-c.a:117:283: warning: null character(s) ignored [enabled by default]
liborientdb-c.a:117:22: error: stray '\22' in program
liborientdb-c.a:117:287: warning: null character(s) ignored [enabled by default]
liborientdb-c.a:117:22: error: …
Run Code Online (Sandbox Code Playgroud)

c c++ linux gcc cc

1
推荐指数
1
解决办法
1905
查看次数

标签 统计

c ×2

c++ ×1

cc ×1

compiler-construction ×1

gcc ×1

linux ×1