[Lazarus] Converting a console app

Juha Manninen juha.manninen at phnet.fi
Wed Jun 30 12:52:26 CEST 2010


Hi,

I am testing the Delphi converter with a console application. Related to:
  http://www.lazarus.freepascal.org/index.php/topic,9746

The converter adds dependency for LCL automatically. I though console apps 
could need LCL, too, because there are Windows compat functions in units like 
LCLIntf.
However, I get linker errors (copied to the end).
When I remove the LCL dependency, the program links and runs OK.

Why does it happen? The obvious solution is not to add LCL dependency to 
console apps. Is it always the correct way?

Juha

----------------------------------------------------

Linking 
/Extra/SW/LazConvertTests/LeipzigSourcen-2010.03.31/ExtractBeta/ExtractBeta
/usr/bin/ld: warning: 
/Extra/SW/LazConvertTests/LeipzigSourcen-2010.03.31/ExtractBeta/link.res 
contains output sections; did you forget -T?
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wsimglist.o: In function 
`REGISTERCUSTOMIMAGELIST':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wsimglist.pp:266: undefined 
reference to `WSRegisterCustomImageList'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wsmenus.o: In function 
`REGISTERMENUITEM':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wsmenus.pp:204: undefined 
reference to `WSRegisterMenuItem'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wsmenus.o: In function 
`REGISTERMENU':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wsmenus.pp:215: undefined 
reference to `WSRegisterMenu'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wsmenus.o: In function 
`REGISTERMAINMENU':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wsmenus.pp:226: undefined 
reference to `WSRegisterMainMenu'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wsmenus.o: In function 
`REGISTERPOPUPMENU':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wsmenus.pp:237: undefined 
reference to `WSRegisterPopupMenu'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wscontrols.o: In function 
`REGISTERDRAGIMAGELIST':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wscontrols.pp:355: undefined 
reference to `WSRegisterDragImageList'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wscontrols.o: In function 
`REGISTERCONTROL':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wscontrols.pp:365: undefined 
reference to `WSRegisterControl'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wscontrols.o: In function 
`REGISTERWINCONTROL':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wscontrols.pp:375: undefined 
reference to `WSRegisterWinControl'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wscontrols.o: In function 
`REGISTERGRAPHICCONTROL':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wscontrols.pp:385: undefined 
reference to `WSRegisterGraphicControl'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wscontrols.o: In function 
`REGISTERCUSTOMCONTROL':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wscontrols.pp:396: undefined 
reference to `WSRegisterCustomControl'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wsforms.o: In function 
`REGISTERSCROLLINGWINCONTROL':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wsforms.pp:203: undefined 
reference to `WSRegisterScrollingWinControl'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wsforms.o: In function 
`REGISTERSCROLLBOX':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wsforms.pp:214: undefined 
reference to `WSRegisterScrollBox'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wsforms.o: In function 
`REGISTERCUSTOMFRAME':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wsforms.pp:225: undefined 
reference to `WSRegisterCustomFrame'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wsforms.o: In function 
`REGISTERCUSTOMFORM':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wsforms.pp:236: undefined 
reference to `WSRegisterCustomForm'
/Extra/SW/lazarus_gitsvn/trunk/lcl/units/i386-linux/wsforms.o: In function 
`REGISTERHINTWINDOW':
/Extra/SW/lazarus_gitsvn/trunk/lcl//widgetset/wsforms.pp:247: undefined 
reference to `WSRegisterHintWindow'
Error: Error while linking




More information about the Lazarus mailing list