[lazarus] Multiplataform
Sebastian Günther
sguenther at gmx.de
Fri Jul 2 02:02:14 EDT 1999
Nicolas Aragon wrote:
> When you write a new widget, you must decide if it will be generally
> available or just for the lib you're using.
yes, of course. But I see one big disadvantage in your approach: It
won't be possible to derive an existing (and fully implemented) widget
class. As said before, in KCL there's this TSHTextEdit widget.
TSHTextEdit is generally available, but it is derived from TScrollBox,
which has to be implemented differently for each target.
I still don't know why this shouldn't work
> Of course the solution is easy with multiple inheritance:
[...]
This would be possible; but I think the solution we found in KCL is
simple enough...
> >> I have it. And it's very simple: component libraries are objects.
> >Can I do something like:
> > TScrollBox.Create
> >within my application? I don't think so.
>
> Yes, you can.
I've thought about all this dynlinking stuff (see other postings), and I
think it is possible if all methods are external. When you have a class
with external constructor, this external constructor will set up the
VMTs and RTTI tables. But I don't know what will happen if you want to
derive an external class, as the VMTs and RTTI stuff can't be declared
as external - the code FPC generates would have to call the inherited
constructor and to use the information it has set up. Perhaps one of the
compiler experts here knows if external classes would be possible
without restrictions?
> >should be in 'the background', normal users (developers) shouldn't see
> >any difference. Delphi uses some dirty hacks to implement its modules;
>
> What do you mean "dirty hacks"?
At least Delphi 4 is capable of using this BPL libraries (DLLs with an
extra function which returns a list of included units): The compiler
won't link units into your app/DLL, if they are part of one BPL in a
user-provided list of BPL files.
> If you know how to write a dll in Linux, you could test something like
> this:
[...]
you won't have to export your functions, as you can compile a unit as
library, so all the stuff in the interface part will be exported
automatically. I think it is possible to merge several libraries using
libtool, but I'm not sure about this.
I've played around this recently, and had some problems regarding the
linking stage, as ld, when called from fpc, won't find my library. I
will have another look at this soon.
- Sebastian
More information about the Lazarus
mailing list