CPort在BCB6下编译问题的解决 [C++ Error] CPort.hpp(683): E2238 Multiple declaration for '_fastcall EComPort::EComPort(int)' [C++ Error] CPort.hpp(675): E2344 Earlier declaration of '_fastcall EComPort::EComPort(int)' [C++ Error] CPort.hpp(695): E2238 Multiple declaration for '_fastcall EComPort::EComPort(int,int)' [C++ Error] CPort.hpp(674): E2344 Earlier declaration of '_fastcall EComPort::EComPort(int,int)' 解决办法:不用怕,屏蔽以下2句话: 在CPort.hpp文件里头 // __fastcall EComPort(int ACode, int AWinCode); // __fastcall EComPort(int ACode); 编译使用时的问题:SetPortA函数的obj对象找不到: [Linker Error] Unresolved external '__fastcall Cport::TCustomComPort::SetPortA(const System::AnsiString)' referenced from E:\BCB_JIN\TESTCOM\TESTCOM.OBJ 在CPort.pas文件里头 解决办法:找到以下三句话: procedure SetPort(const Value: TPort); property Port: TPort read FPort write SetPort; procedure TCustomComPort.SetPort(const Value: TPort); 改成: procedure SetPortA(const Value: TPort); property Port: TPort read FPort write SetPortA; procedure TCustomComPort.SetPortA(const Value: TPort); 改完后,再重新编译安装! 在工程中编译错误:Ambiguity between 'TBitmap' and 'Windows::TBitmap' 将TBitmap改成Graphics::TBitmap