[beginer] How can i use LCL in a Library ? lazarus / 31-LCL ---------------------------------------------------------------------- Davidcfres · 2010-05-09 18:53 Hi, I need to use some functions and Objects of the LCL in a Library, but Lazarus don't wants to compile my code. A Basic example : I can't compile a Library using basic "ShowMessage" function : the "uses dialogs" refers to Dialogs.pas (fpc\2.2.4\source\packages\fv\src) who 's not contening showmessage function. What's wrong ? Is anyone gets the same problem ? what is the solution ? Thanx for help ! ---------------------------------------------------------------------- Martin_fr · 2010-05-09 19:59 You need to add the LCL as package dependency to your project. and you need to add "uses interfaces" But, be aware => most parts of the LCL do not work in a library http://bugs.freepascal.org/view.php?id=7182 ShowMessage is likely one of the bits that will not work inside a DLL. But I haven't tested, so feel free to try....