0

I am following the RAD Studio tutorial in the official Embarcadero documentation, but now it won't compile. It outputs this error message:

[ilink32 Error] Error: Unresolved external '__fastcall TTextEditorForm::FormGesture(System::TObject *, Fmx::Types::TGestureEventInfo&, bool&)' referenced from C:\USERS\ADMIN\DOCUMENTS\EMBARCADERO\STUDIO\PROJECTS\WIN32\DEBUG\DOCSTUT.OBJ
[ilink32 Error] Error: Unresolved external '__fastcall TTextEditorForm::NewClick(System::TObject *)' referenced from C:\USERS\ADMIN\DOCUMENTS\EMBARCADERO\STUDIO\PROJECTS\WIN32\DEBUG\DOCSTUT.OBJ
[ilink32 Error] Error: Unable to perform link

I believe that what happened was that I mis-clicked one of the items and added an event handler for OnFormGesture, which I didn't mean to and immediately deleted.

Additionally, when I was going back and forth between the design view and the code editor, I got this error message:

[6F9B92B1]{rtl280.bpl  } System.Classes.TInterfaceList.Clear (Line 5607, "System.Classes.pas" + 1) + $3
[6F8C39CC]{rtl280.bpl  } System.@UStrSetLength (Line 31269, "System.pas" + 27) + $0
[6F8C3B80]{rtl280.bpl  } System.@UStrCatN (Line 31641, "System.pas" + 67) + $0
[69FA10FB]{comptoolbar280.bpl} CompToolbarFrame.TComponentToolbarFrame.InitializePalette (Line 840, "CompToolbarFrame.pas" + 1) + $9
[69FA0A43]{comptoolbar280.bpl} CompToolbarFrame.TComponentToolbarFrame.EndUpdate (Line 659, "CompToolbarFrame.pas" + 13) + $6
[6EDC4293]{coreide280.bpl} PalMgr.TPaletteManager.EndUpdate (Line 1111, "PalMgr.pas" + 13) + $5
[6F01FE6B]{coreide280.bpl} EditorForm.TEditWindow.EndViewSelect (Line 4820, "EditorForm.pas" + 1) + $9
[6F018DD7]{coreide280.bpl} EditorForm.TEditWindow.SwitchViews (Line 2296, "EditorForm.pas" + 11) + $3
[6F0188D2]{coreide280.bpl} EditorForm.TEditWindow.ViewBarChange (Line 2136, "EditorForm.pas" + 10) + $10
[6E3A8701]{vcl280.bpl  } Vcl.Tabs.TTabSet.CanChange (Line 1962, "Vcl.Tabs.pas" + 3) + $D
[6E3A8751]{vcl280.bpl  } Vcl.Tabs.TTabSet.SetTabIndex (Line 1973, "Vcl.Tabs.pas" + 5) + $4
[6E3A89D6]{vcl280.bpl  } Vcl.Tabs.TTabSet.MouseDown (Line 2085, "Vcl.Tabs.pas" + 6) + $6
[6E1D8670]{vcl280.bpl  } Vcl.Controls.TControl.DoMouseDown (Line 7730, "Vcl.Controls.pas" + 7) + $29
[6E1D6A1B]{vcl280.bpl  } Vcl.Controls.TControl.SetMouseCapture (Line 6654, "Vcl.Controls.pas" + 2) + $6
[6E1D86BF]{vcl280.bpl  } Vcl.Controls.TControl.WMLButtonDown (Line 7741, "Vcl.Controls.pas" + 7) + $E
[6E1D802E]{vcl280.bpl  } Vcl.Controls.TControl.WndProc (Line 7591, "Vcl.Controls.pas" + 91) + $6
[6E2E3338]{vcl280.bpl  } Vcl.Themes.TStyleManager.HandleMessage (Line 5872, "Vcl.Themes.pas" + 11) + $11
[6E1DD1F5]{vcl280.bpl  } Vcl.Controls.TWinControl.WndProc (Line 10644, "Vcl.Controls.pas" + 170) + $6

I tried doing clean builds, but that didn't change anything. I tried using the RAD Studio Command Line, but it always said the project didn't exist. I also tried right-clicking the error messages and to View Source, but the option was grayed out.

2
  • Unimplemented (empty) event handlers are normally automatically removed when you save/compile. Add the two missing functions and save/compile and see what happens.
    – Ted Lyngmo
    Jun 8 at 15:14
  • you can also open heder file of the formular involved and delete the headers without code ... (its usually faster than open object inspector and click in the missing events)
    – Spektre
    Jun 8 at 17:49

1 Answer 1

1

I believe that what happened was that I mis-clicked one of the items and added an event handler for OnFormGesture, which I didn't mean to and immediately deleted.

It sounds like you deleted the entire method definition from the Form's .cpp file, but did not delete the corresponding declaration from the Form's .h file. Update the .h file and the error should go away.

When dealing with event handlers at design-time, it is better to let the IDE manage them for you. If you want to remove an unused event handler, don't actually delete it manually. Just remove all of the code inside of the body of the handler's definition. When the file is saved, the IDE automatically deletes empty event handlers that are assigned to published events.

Additionally, when I was going back and forth between the design view and the code editor, I got this error message

That is clearly a bug in the IDE itself. Such errors should be reported to Embarcadero directly.

1
  • just beware while saving empty handlers the IDE (not sure if new RAD does it too but I saw this bug occassionaly on all versions of BCB I used in past) sometimes mess up lines before/after it ... (by deleting end of line of previous line and joining it with next line)
    – Spektre
    Jun 9 at 6:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.