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.
Linux ソケット アプリケーションをコンパイルするために使用できる公開されているヘッダーはありますか (socket/udp/ip ヘッダーを使用)。sa_family_t,in_port_t のような構造を定義する必要があります。
必須は、cygwin/gcc または mingw コンパイラではなく、Msdev を使用することです。
標準の Win32 API から winsock.h または winsock2.h で宣言された構造体と関数を使用できます。標準の BSD 実装とはいくつかの違いがありますが、単純なソケットベースのアプリケーションの場合、移植は比較的簡単です。
私の知る限り、これを行う簡単な方法はありません。Windows は、Linux とはまったく異なるシステム コールのセットと、ソケットを処理するための異なる方法を提供します。