www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - shared libraries in linux

reply g g <d d.come.on.a> writes:
I have successfully made funtions and structs in shared libraries in linux with
dmd, but i have no idea how to do that with classes, and how call the static
this() funtion of the linked module, because variables ( even immutable ) are
not correctly set without calling it.

Thanks.

gzkp0s 
Aug 15 2010
parent reply Jonathan M Davis <jmdavisprog gmail.com> writes:
On Sunday 15 August 2010 09:40:53 g g wrote:
 I have successfully made funtions and structs in shared libraries in linux
 with dmd, but i have no idea how to do that with classes, and how call the
 static this() funtion of the linked module, because variables ( even
 immutable ) are not correctly set without calling it.
 
 Thanks.
 
 gzkp0s
If you search the main D list, you should be able to find several discussions on share libraries. But they aren't really supported yet. I don't know what the details are, but there are some issues (at it looks like you found some) which make them not quite work yet. Walter is currently working on the 64-bit port of dmd on Linux. I'm not sure whether he's going to work on the Windows 64-bit after that, or if he's working on the shared library issue next, but if he's working on the Windows 64-bit port next, he'll be working on the shared libraries right after that. So, it's in the queue and a high priority for Walter at this point, but it hasn't been done yet. - Jonathan M Davis
Aug 15 2010
parent Jacob Carlborg <doob me.com> writes:
On 2010-08-15 23:56, Jonathan M Davis wrote:
 On Sunday 15 August 2010 09:40:53 g g wrote:
 I have successfully made funtions and structs in shared libraries in linux
 with dmd, but i have no idea how to do that with classes, and how call the
 static this() funtion of the linked module, because variables ( even
 immutable ) are not correctly set without calling it.

 Thanks.

 gzkp0s
If you search the main D list, you should be able to find several discussions on share libraries. But they aren't really supported yet. I don't know what the details are, but there are some issues (at it looks like you found some) which make them not quite work yet. Walter is currently working on the 64-bit port of dmd on Linux. I'm not sure whether he's going to work on the Windows 64-bit after that, or if he's working on the shared library issue next, but if he's working on the Windows 64-bit port next, he'll be working on the shared libraries right after that. So, it's in the queue and a high priority for Walter at this point, but it hasn't been done yet. - Jonathan M Davis
http://d.puremagic.com/issues/show_bug.cgi?id=4583 for example. -- /Jacob Carlborg
Aug 16 2010