[Lazarus] Using Lazarus to build a (Linux) shared library, with a form

Sven Barth pascaldragon at googlemail.com
Mon Jun 11 12:43:19 CEST 2012

Am 11.06.2012 12:34, schrieb Mark Morgan Lloyd:
> Sven Barth wrote:
>> Am 11.06.2012 11:38, schrieb Mark Morgan Lloyd:
>>> I'm struggling here. I can build a trivial (empty) .so using Lazarus
>>> 1.1+2.6.0, the only necessary manual operation being to tell the project
>>> options to remove the (Windows-specific?) -Wr option. I can load the
>>> result at runtime, although I've not so far put significant code into
>>> it.
>>> As soon as use Lazarus to add a form to the project, it no longer loads.
>>> In order to find out what's going wrong I've had to use dlerror(), i.e.
>>> bypassing the dynlibs library since it doesn't have a function e.g.
>>> GetLoadErrorStr(). This shows me that the low-level dlopen() is
>>> complaining "undefined symbol: WSRegisterCustomImageList".
>>> What do I have to manually add to the project to get this working?
>> Estimated guess: add unit "interfaces" to your library project file.
> Thanks Sven, that does indeed fix it :-)
> I was very much at the point of wanting to ask people who knew what they
> were doing, rather than flail around digging myself into a deeper hole.

Well... regarding the LCL you should keep in mind that you always need 
the widgetset implementation and that is provided by the unit 
"Interfaces". So you need to include that unit in every binary (program, 
library) were you want to use LCL controls.


More information about the Lazarus mailing list