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.
我有一些使用 UNIX 套接字的代码。但是我需要为winodws编译它(在mac os x上使用mingw32)但我不想使用winsock,因为我担心兼容性!有没有办法在 Windows 上使用 UNIX 套接字?
如果您坚持使用 Winsock 提供的 BSD API,那么您将不会遇到那么多问题。少量的启动和关闭代码将是特定于 Windows 的,但大多数套接字代码将是跨平台的。
我建议研究 cygwin (http://www.cygwin.com/),他们尽一切努力兼容。但是,我不知道您将如何在 Mac OSX 上为该环境进行交叉编译。