FindText() / FindTextA() problem

  • Hi,

    I get a linker error compiling wpViewPdf3 in Borland C++ Builder 5 (Windows XP).
    The error says:
    [Linker Error] Unresolved external '__fastcall Wpviewpdf3::TWPViewPDF::FindTextA(System::AnsiString, bool, bool, bool, bool)' referenced from ...

    This is what I have:
    int p= WPViewPDF1->FindText(SomeText,...

    If I change in my code FindText to FindTextA I still have this problem.
    Borland C++ Compiler's "Code Completion" only shows FindTextA as a method but in wpViewPdf3.pas the method is defined as Findtext (without A, that I guess stands for AnsiString). There is no FindTextA declaration anywhere.

    Is there a disjoint between how the method was registered, to what it actually should be in the hpp files?
    Do I lack any reference?

    Any help would be much appreciated!

    Thanks,

    Edorta

    • Offizieller Beitrag

    Hi,

    there is only a FindText, not a FindTextA.

    But you can also directly use the "Command" method to do the serach.

    The code for FindText is

    So you can basically call

    CommandStr(COMPDF_FindText, Text);

    Julian

  • Hi Julian.

    there is only a FindText, not a FindTextA
    I know. That's why I am so puzzled.

    But you can also directly use the "Command" method to do the serach.
    I have done as you suggested and it certainly works, though I'm still trying to find an explanation for what was happening. How can Builder's "Code completion" detect a FindTextA method that does not exist?


    Thank you for answering.
    Edorta