Recent

Author Topic: i can not solve this error  (Read 20222 times)

cpalx

  • Hero Member
  • *****
  • Posts: 619
i can not solve this error
« on: July 31, 2009, 05:06:55 am »
Hello,
i convert a delphi project in lazarus project, but when i compile, i have the above error, any idea?

i work in windows XP,

Intro.pas(8,20) Hint: Unit "messages" not used in Intro
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomImageList
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterMenuItem
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterMenu
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterMainMenu
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterPopupMenu
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterDragImageList
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterControl
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterWinControl
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterGraphicControl
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomControl
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterScrollingWinControl
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterScrollBox
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomFrame
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomForm
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterHintWindow
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomScrollBar
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomGroupBox
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomComboBox
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomListBox
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomEdit
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomMemo
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterButtonControl
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomButton
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomCheckBox
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterToggleBox
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterRadioButton
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomStaticText
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomLabel
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomBitBtn
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomSpeedButton
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomPage
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomNotebook
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterShape
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomSplitter
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterPaintBox
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomImage
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterBevel
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomRadioGroup
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomCheckGroup
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomLabeledEdit
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomPanel
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCustomTrayIcon
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterCommonDialog
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterFileDialog
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterOpenDialog
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterSaveDialog
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterSelectDirectoryDialog
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterColorDialog
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterColorButton
Fractal.lpr(22,1) Error: Undefined symbol: WSRegisterFontDialog
Fractal.lpr(22,1) Fatal: There were 50 errors compiling module, stopping

Leledumbo

  • Hero Member
  • *****
  • Posts: 8112
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: i can not solve this error
« Reply #1 on: July 31, 2009, 12:28:19 pm »
Add Interfaces to your uses clause (before Forms). I'll try tweaking the tool so that it would add it automatically since this problem is very common.

cpalx

  • Hero Member
  • *****
  • Posts: 619
Re: i can not solve this error
« Reply #2 on: July 31, 2009, 03:54:16 pm »
That solved the problem, thanks a lot

Leledumbo

  • Hero Member
  • *****
  • Posts: 8112
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: i can not solve this error
« Reply #3 on: August 01, 2009, 07:45:28 am »
If next time you convert another one, do this to automatically insert Interfaces unit: Open components/codetools/stdcodetools.pas and go to line 3714. Insert this code:
Code: [Select]
if not AddUnitToMainUsesSection('Interfaces','',SourceChangeCache) then
begin
  debugln('ConvertUsedUnits Unable to add Interfaces to main uses section');
  exit;
end;
before:
Code: [Select]
if AddLRSCode then
  if not AddUnitToMainUsesSection('LResources','',SourceChangeCache) then
  begin
    debugln('ConvertUsedUnits Unable to add LResources to main uses section');
    exit;
  end;
and it's done.

cpalx

  • Hero Member
  • *****
  • Posts: 619
Re: i can not solve this error
« Reply #4 on: August 01, 2009, 08:23:36 pm »
Thanks a lot for your tip.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: i can not solve this error
« Reply #5 on: August 02, 2009, 01:15:23 pm »
Leledumbo, did you create a bug report with this patch?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8112
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: i can not solve this error
« Reply #6 on: August 03, 2009, 10:02:45 am »
Quote
Leledumbo, did you create a bug report with this patch?
No, not yet. Maybe later, I'll have to diff it first (which I haven't done).

Elphi

  • Full Member
  • ***
  • Posts: 132
Re: i can not solve this error
« Reply #7 on: August 24, 2009, 08:32:58 pm »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8112
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: i can not solve this error
« Reply #8 on: August 25, 2009, 07:40:41 am »
That's not me. Well, if somebody already creates a patch for it, then I don't think I need to do the same.

Paulo França Lacerda

  • New Member
  • *
  • Posts: 44
    • BlaisePoint Informática
Re: i can not solve this error
« Reply #9 on: June 27, 2016, 08:21:30 am »
Add Interfaces to your uses clause (before Forms).
God bless you! You saved my day. :)
Lazarus 1.6.0.4 on FreePascal 3.0
Windows 7 32-bit

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3646
  • I like bugs.
Re: i can not solve this error
« Reply #10 on: June 27, 2016, 10:42:00 am »
Add Interfaces to your uses clause (before Forms).
God bless you! You saved my day. :)

FYI, this thread happened in year 2009 when the Delphi converter was still under construction.
Now it can do all trivial stuff, including adding the Interfaces unit to uses clause.
Thus, always use the automatic conversion first for your Delphi code and then continue manually.

Paulo França Lacerda

  • New Member
  • *
  • Posts: 44
    • BlaisePoint Informática
Re: i can not solve this error
« Reply #11 on: June 27, 2016, 10:45:20 am »
FYI, this thread happened in year 2009 when the Delphi converter was still under construction.
Now it can do all trivial stuff, including adding the Interfaces unit to uses clause.
Thus, always use the automatic conversion first for your Delphi code and then continue manually.
Thank you for the update. :)
Lazarus 1.6.0.4 on FreePascal 3.0
Windows 7 32-bit