不兼容的编译错误内置函数 'execl'

msk*_*msk 1 c

我正在使用 cywin 在 Windows 上编译 crashme 源代码,但我正面临一些编译错误。

错误:

crashme.c: In function 'vfork_main':
crashme.c:594: warning: incompatible implicit declaration of built-in function ‘execl’
Run Code Online (Sandbox Code Playgroud)

虽然源代码包含 unistd.h,但错误仍然存​​在。请帮助我如何解决这个问题。

Bas*_*tch 5

也许缺少#include了的“系统”标题定义execl(即<unistd.h>在Linux上)。

要找出包含的内容,请使用gcc -H -c foo.c和使用gcc -C -E -Wall foo.c > foo.i获取预处理的表单。