具有Cygwin/Win7的GCC:缺少syscall.h [英] GCC with Cygwin/Win7: missing syscall.h

查看:177
本文介绍了具有Cygwin/Win7的GCC:缺少syscall.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Windows 7 Cygwin上编译linux c ++源代码,并出现以下错误:

I am trying to compile a linux c++ source code on Windows 7 Cygwin and getting following error:

$ make
getconf: Unrecognized variable `LFS_CFLAGS'
gcc -O3 -Wall -Wextra -g -DVERSION='"v1.1.0"'  -c src/main.c -o src/main.o
src/main.c:10:25: schwerwiegender Fehler: sys/syscall.h: No such file or directory
 #include <sys/syscall.h>
                         ^
Kompilierung beendet.
Makefile:48: recipe for target 'src/main.o' failed
make: *** [src/main.o] Error 1

我用谷歌搜索,但没有成功.有什么想法吗?

I googled this but hadn't any success. Any ideas?

推荐答案

syscall.h 是特定于操作系统的,因此在cygwin下,特定于syscall的东西很可能会失败,因此不受支持.

syscall.h is OS specific so syscall specific stuff is likely to fail anyway under cygwin so it's not supported.

您必须将其中包含的内容包装在某些 #ifdef 下,并编写适当的移植代码,以使其在Windows下运行.

You will have to wrap that include under some #ifdef and write appropriate porting code for it to run under Windows.

这篇关于具有Cygwin/Win7的GCC:缺少syscall.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆