Menu

#3 LINKER error

open
nobody
None
5
2004-09-27
2004-09-27
Anonymous
No

i have BCB6 and TComport 3 (release 19-5-2003);when i
compile my project which contains the following line of
code(in fmain.cpp):
->port = "COM2";
i get the following LINKER error :
unresolved external '__fastcall
TCustomComPort::SetportA(System::Ansistring )'
refrenced from 'c:\\TA\\fMain.obj'

Discussion

  • Jacky

    Jacky - 2005-01-06

    Logged In: YES
    user_id=1176467

    1. remove TComPort component;
    2. replace SetPort with say mySetPort in CPort.pas (3 times
    total);
    3. re-install TComPort component.

     
  • Nobody/Anonymous

    Logged In: NO

    Hi

    I have same problem.
    Edit CPort.pas, rename 3 times SetPort to
    mySetPortreinstall component and have same problem

    In execution Time is impossible put ->Port="COM5"

    Please helpme

    Thanks

    John

     
  • Greg Hicks

    Greg Hicks - 2007-07-22

    Logged In: YES
    user_id=1850657
    Originator: NO

    HI

    This is a small issue that arises from the conflict between ComPort in Windows and TComport""SetPort.

    It requires the addition of 6 lines total wrapping the definition and inplemetation of TComPort::SetPort

    #ifdef SetPort
    #undef SetPort
    SetPort()
    #define SetPort SetPortA
    #endif

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.