Forum > LCL
[beginer] How can i use LCL in a Library ?
(1/1)
Davidcfres:
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:
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....
Navigation
[0] Message Index