Status D dynamic libs?

Walter Bright newshound1 at digitalmars.com
Sat Apr 19 12:59:51 PDT 2008


Frank Benoit wrote:
> If i want to put dwt into a dynamic lib, then i have those components
> 
> - D runtime (tango)
> - dwt (either dwt-win or dwt-linux, depends on tango)
> - dwt-addons (optionally, dependending on dwt-win/dwt-linux and tango)
> - application code, depending on all above.
> 
> What i want to do is, to put all dwt and dwt-addons stuff into two libs.
> 
> I hope to get shorter build times and smaller executables.
> 
> Is that possible on win/linux?
> What are the problems?
> 
> As far as I remember, Walter said at the conference that DMD /does/ 
> generate pic (position independent code) and it /should/ work. If there 
> are problems, he would need examples and/or bug reports. Are there 
> problems? Are there reports?
> 

First of all, with Windows, you can already create DLLs and use them 
now. It also has nothing whatsoever to do with PIC. There is an example 
on doing Windows DLLs in the samples directory.

Shared libraries under Linux are completely different. The compiler does 
generate PIC code, so the compiler work is done, but nobody has sat down 
and figured out the details of making Phobos work as a shared library.



More information about the Digitalmars-d mailing list