ClientSocket/ServerSocket 問題 |
答題得分者是:aftcast
|
leo7w076sc
一般會員 ![]() ![]() 發表:6 回覆:7 積分:2 註冊:2010-08-10 發送簡訊給我 |
INDY9.0元件安裝後,使用ClientSocket/ServerSocket 都會編繹出錯,如下
[C Error] winsock.h(55): E2015 Ambiguity between 'u_int' and 'Idwinsock2::u_int' [C Error] winsock.h(63): E2015 Ambiguity between 'fd_set' and '_fastcall Idwinsock2::fd_set(int,TFDSet &)' [C Error] winsock.h(63): E2015 Ambiguity between 'fd_set' and '_fastcall Idwinsock2::fd_set(int,TFDSet &)' [C Error] winsock.h(170): E2015 Ambiguity between 'u_long' and 'Idwinsock2::u_long' [C Error] winsock.h(271): E2015 Ambiguity between 'u_char' and 'Idwinsock2::u_char' [C Error] winsock.h(272): E2015 Ambiguity between 'u_short' and 'Idwinsock2::u_short' [C Error] winsock.h(273): E2015 Ambiguity between 'u_long' and 'Idwinsock2::u_long' [C Error] winsock.h(321): E2015 Ambiguity between 'u_short' and 'Idwinsock2::u_short' [C Error] winsock.h(493): E2015 Ambiguity between 'u_short' and 'Idwinsock2::u_short' [C Error] winsock.h(502): E2015 Ambiguity between 'u_short' and 'Idwinsock2::u_short' [C Error] winsock.h(503): E2015 Ambiguity between 'u_short' and 'Idwinsock2::u_short' [C Error] winsock.h(539): E2015 Ambiguity between 'u_short' and 'Idwinsock2::u_short' [C Error] winsock.h(540): E2015 Ambiguity between 'u_short' and 'Idwinsock2::u_short' [C Error] winsock.h(762): E2015 Ambiguity between 'u_long' and 'Idwinsock2::u_long' [C Error] winsock.h(781): E2015 Ambiguity between 'u_long' and 'Idwinsock2::u_long' [C Error] winsock.h(783): E2015 Ambiguity between 'u_short' and 'Idwinsock2::u_short' [C Error] winsock.h(793): E2015 Ambiguity between 'u_long' and 'Idwinsock2::u_long' [C Error] winsock.h(795): E2015 Ambiguity between 'u_short' and 'Idwinsock2::u_short' [C Error] winsock.h(813): E2015 Ambiguity between 'fd_set' and '_fastcall Idwinsock2::fd_set(int,TFDSet &)' [C Error] winsock.h(814): E2015 Ambiguity between 'fd_set' and '_fastcall Idwinsock2::fd_set(int,TFDSet &)' [C Error] winsock.h(815): E2015 Ambiguity between 'fd_set' and '_fastcall Idwinsock2::fd_set(int,TFDSet &)' [C Error] winsock.h(813): E2015 Ambiguity between 'fd_set' and '_fastcall Idwinsock2::fd_set(int,TFDSet &)' [C Error] winsock.h(814): E2015 Ambiguity between 'fd_set' and '_fastcall Idwinsock2::fd_set(int,TFDSet &)' [C Error] winsock.h(815): E2015 Ambiguity between 'fd_set' and '_fastcall Idwinsock2::fd_set(int,TFDSet &)' [C Error] winsock.h(895): E2015 Ambiguity between 'u_int' and 'Idwinsock2::u_int' [C Error] winsock.h(895): E2228 Too many error or warning messages 有試過在網路上找尋解決方法 「Project/Options」,點選「Directories/Conditionals」,在「Conditional defines」欄位中加入 「_WINSOCKAPI_」字串 但是還是會出現下列錯誤 [C Error] WinSock.hpp(21): E2257 , expected [C Error] WinSock.hpp(28): E2257 , expected [C Error] WinSock.hpp(32): E2257 , expected [C Error] WinSock.hpp(36): E2257 , expected [C Error] WinSock.hpp(40): E2257 , expected [C Error] WinSock.hpp(44): E2257 , expected [C Error] WinSock.hpp(48): E2257 , expected [C Error] WinSock.hpp(52): E2257 , expected [C Error] WinSock.hpp(56): E2257 , expected [C Error] WinSock.hpp(60): E2257 , expected [C Error] WinSock.hpp(64): E2257 , expected 請問該如何解決??謝謝^^ |
aftcast
站務副站長 ![]() ![]() ![]() ![]() ![]() 發表:81 回覆:1485 積分:1763 註冊:2002-11-21 發送簡訊給我 |
若沒使用到indy元件的project時,記得把 include的路徑做一些調整 :
把含IdWinSock2.hpp的路徑移除,或是把該路徑放到最後面。 project->option->directories/… -> include path 你遇到的這個問題應該是和你說的那個 define 沒有關係。那是解決另一種問題,而非你遇到的問題。所以不需要_WINSOCKAPI_
------
蕭沖 --All ideas are worthless unless implemented-- C++ Builder Delphi Taiwan G+ 社群 http://bit.ly/cbtaiwan |
leo7w076sc
一般會員 ![]() ![]() 發表:6 回覆:7 積分:2 註冊:2010-08-10 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |