GCC with Cygwin/Win7: missing syscall.h

ⅰ亾dé卋堺 提交于 2021-02-10 20:19:30

问题


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?


回答1:


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

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



来源:https://stackoverflow.com/questions/19894482/gcc-with-cygwin-win7-missing-syscall-h

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!