问题
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