Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 Cygwin 中编译一个程序,它需要 shadow.h 在其中一个源文件中,而 /usr/include 路径中缺少该程序。如何在 Cygwin 中添加阴影支持?任何要安装的软件包?
在 CentOS 中,只需安装 gcc 和 glibc 就提供了 shadow.h 头文件。我需要在 Cygwin 中安装哪些等效软件包?
shadow.h 是定义类型 struct spwd,它是 Gnulib 的一部分。你的编译没有得到这个库的支持。
/usr/lib 中应该有一个 libshadow.a,您需要在构建过程中包含它,如下所示
gcc program.c -o program -lshadow
为了更好地理解,您也可以在这里查看。
Edited Later:
我刚知道shadow.h的移植有一些问题,这个问题也包括cygwin 。请参考这里。
目前还没有,所以在有人将这些 API 贡献给 Cygwin 之前,这不会起作用。