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.
我正在尝试使用 MingW32 编译我的客户端服务器程序,但出现错误:
没有系统/socket.h
所以编译终止。
我怎么解决这个问题?
该文件在 Windows 上不存在 - 要使用网络套接字,您必须使用Winsock。幸运的是,它与 UNIX 的 Berkeley 套接字非常相似。
如果它可以节省您的任何时间,我已经编写了一个可以在 Windows 和 *nix 系统上编译的瘦套接字包装器。你可以在这里找到它。