筍子工作雜記

二月 10, 2009

C++ Builder: Winsock 1 和 Winsock 2 Header 重複的問題

Filed under: C++,Programming — 標籤:, , , — shinnlu @ 5:28 下午

使用 Indy 元件時,有時候會遇到元件引用的問題,在 Winsock1 和 Winsock2 的Header 裡,有不少是相同名字的宣告,而

發生時的錯誤訊息如下:
[C++ Error] winsock2.h(113): E2238 Multiple declaration for ‘fd_set’
[C++ Error] winsock.h(55): E2344 Earlier declaration of ‘fd_set’
[C++ Error] winsock2.h(116): E2146 Need an identifier to declare
[C++ Error] winsock2.h(157): E2238 Multiple declaration for ‘timeval’
[C++ Error] winsock.h(98): E2344 Earlier declaration of ‘timeval’ (more…)

Powered by WordPress