CV工程师
2024-07-31 03:07:06 阅读:480
$ ./make.sh
make: 进入目录“/home/HONOR/vdexExtractor-0.6.0/src”
fatal: not a git repository (or any of the parent directories): .git
rm -f *.o
rm -f */*.o
rm -f vdexExtractor
make: 离开目录“/home/HONOR/vdexExtractor-0.6.0/src”
make: 进入目录“/home/HONOR/vdexExtractor-0.6.0/src”
fatal: not a git repository (or any of the parent directories): .git
gcc -c -std=c11 -D_GNU_SOURCE -Wall -Wextra -Werror -DVERSION=\"dev-\" -c dex.c -o dex.o
gcc -c -std=c11 -D_GNU_SOURCE -Wall -Wextra -Werror -DVERSION=\"dev-\" -c dex_instruction.c -o dex_instruction.o
dex_instruction.c:655:43: 错误:argument 2 of type ‘u4[kMaxVarArgRegs]’ {或称 ‘unsigned int[kMaxVarArgRegs]’} declared as a variable length array [-Werror=vla-parameter]
655 | void dexInstr_getVarArgs(u2 *code_ptr, u4 arg[kMaxVarArgRegs]) {
| ~~~^~~~~~~~~~~~~~~~~~~
In file included from dex_instruction.c:23:
dex_instruction.h:278:32: 附注:previously declared as an ordinary array ‘u4[]’ {或称 ‘unsigned int[]’}
278 | void dexInstr_getVarArgs(u2 *, u4[]);
| ^~~~
cc1:所有的警告都被当作是错误
make: *** [Makefile:56: dex_instruction.o] Error 1
make: 离开目录“/home/HONOR/vdexExtractor-0.6.0/src”
[-] build failed
报这个错误的话,我看GitHub上面一共三种解决办法:
-Werror
void dexInstr_getVarArgs(u2 *,u4 arg[kMaxVarArgRegs ]);
make CFLAGS="${CFLAGS} -Wno-error=vla-parameter" -C src
替代./make.sh
命令进行编译。但是我都失败了,于是又下载了一个0.52的版本,然后按照方法1成功解决:
评论
扫描二维码获取文章详情
更多精彩内容尽在:WWW.ZNGG.NET