Dynamic D Library

teo teo.ubuntu.remove at yahoo.com
Tue Jul 28 11:16:30 PDT 2009


On Mon, 27 Jul 2009 20:34:44 +0000, BCS wrote:

> Reply to teo,
> 
>> I did some tests and here are the results: D cannot be used in Shared
>> Objects. The only case that works is when no classes are exported and
>> when there are no references to Phobos within the library.
> 
> 
> this works:
> 
it doesn't work with v2.031


> module test;
> int test1() { return 0; }

dmd complains:
> char[] test2() { return "hello world"; }
> 
test.d(3): Error: cannot implicitly convert expression ("hello world") of 
type immutable(char)[] to char[]

when I change it to:
string test2() { return "hello world"; }

$ dmd main.d -L-L`pwd` -L-ltest
main.d(6): Error: undefined identifier test2
main.d(6): Error: function expected before (), not test2 of type int
main.d(7): Error: identifier 'C' is not defined
main.d(7): Error: C is used as a type
main.d(7): Error: new can only create structs, dynamic arrays or class 
objects, not void's
main.d(7): Error: no property 'get' for type 'void'
main.d(7): Error: function expected before (), not __error of type int



More information about the Digitalmars-d mailing list