SetPortA函数的Obj对象找不到
已经将控件的sources路径加入到Libary?path。
编译的时候没问题,在链接的时候:
SetPortA函数的obj对象找不到:
[Linker?Error]?Unresolved?external?'__fastcall?Cport::TCustomComPort::SetPortA
(const?System::AnsiString)'?referenced?from?E:\BCB_JIN\TESTCOM\TESTCOM.OBJ
在网上搜索了一下,看到:
解决办法:找到以下三句话:
procedure SetPort(const Value: TPort); //1
property Port: TPort read FPort write SetPort; //2
procedure TCustomComPort.SetPort(const Value: TPort); //3
改成:
procedure SetPortA(const Value: TPort);
property Port: TPort read FPort write SetPortA;
procedure TCustomComPort.SetPortA(const Value: TPort);
//我在 Cport.hpp 里面只找到1,2.还有3找不到
line 375: void __fastcall SetPort(const AnsiString Value); //1
line 477: __property AnsiString Port = {read=FPort, write=SetPort}; //2
//3 找不到