Compiling a shared library

2011-01-14 Thread Mandeep Singh Brar
Hi, I read on this website that it is possible to create shared libraries on linux using dmd. Is that correct? I am trying to compile the following code: module testPlugin; import std.stdio; export class testPlugin { export void testMethod() { writeln("This is method fro

Re: Assertion failure: '!cases' on line 2620 in file 'statement.c'

2011-01-14 Thread Don
%u wrote: == Quote from Don (nos...@nospam.com)'s article Yay for first time compiling dmd :) Sorry you had to do that! Had to learn that once anyway :) Maybe I'll even be able to take a stab at fixing bugs someday.. Added your bug as: http://d.puremagic.com/issues/show_bug.cgi?id=5453

Re: Compiling a shared library

2011-01-14 Thread Jonathan M Davis
On Friday 14 January 2011 00:49:12 Mandeep Singh Brar wrote: > Hi, > > I read on this website that it is possible to create shared libraries on > linux using dmd. Is that correct? > I am trying to compile the following code: > > module testPlugin; > import std.stdio; > > export class testPlugin

Re: Compiling a shared library

2011-01-14 Thread Jacob Carlborg
On 2011-01-14 09:49, Mandeep Singh Brar wrote: Hi, I read on this website that it is possible to create shared libraries on linux using dmd. Is that correct? I am trying to compile the following code: module testPlugin; import std.stdio; export class testPlugin { export void testMetho

Re: toDelegate() for D1

2011-01-14 Thread Stewart Gordon
On 13/01/2011 17:14, %u wrote: == Quote from Simen kjaeraas (simen.kja...@gmail.com)'s article %u wrote: I only need something to make a void deleg() from a void func(). This works for me: ReturnType!( F ) delegate( ParameterTypeTuple!( F ) ) toDelegate( F )( F fn ) { return ( Parameter

Re: toDelegate() for D1

2011-01-14 Thread Simen kjaeraas
Moritz Warning wrote: My tangofied of this code works, maybe it's a lib bug? On the other hand, is the delegate allocated on the stack? Anyway, here is another way: R delegate(T) toDg(R, T...)(R function(T) fp) { struct dg { R opCall(T t) { return (cast(R fu

Assigning Interface to Object

2011-01-14 Thread Mandeep Singh Brar
Hi, I am not able to assign an interface to object. The following code does not compile. module testObj; public interface testInterface { void someMethod(); } public class testObj { Object someCaller; this(Object caller) { someCaller = caller; }

How to get 'import' clauses from d file?

2011-01-14 Thread Alex Khmara
Hello! I'm trying to make some home-grown d build system, but and one of my tasks is to get module dependencies. Yes, I know about -deps DMD switch, but it works when all needed modules are given to compiler. But if some dependencies absent compiler just aborts with error "module foo is in fi