Example Attached

Heinz malagana15 at yahoo.es
Tue Feb 10 10:51:00 PST 2009


Heinz Wrote:

> Hello everyone.
> I've been using DLL's in D for a long time but just recently i'm having a problem. Lets see if someone can help me a bit.
> 
> I have several lines of code but i'll use an example from the DMD site wich is almost the same come.
> 
> Read the DMD site about DLL's here: http://www.digitalmars.com/d/1.0/dll.html
> 
> Check for the section "D code calling D code in DLLs".
> 
> If you extern(C) all exports in mydll.d and change all symbols in test.d to their C respectives, when running you'll get access violation.
> 
> Any ideas?

I attached a rar file with the sources just to see what i'm talking about. The example is from the DMD site. Included is the extern D (ok) and the extern C (fails). To compile open "compile.bat" and to run the programs use "run.bat".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mydll.rar
Type: application/rar
Size: 1967 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20090210/f9d7bd97/attachment.rar>


More information about the Digitalmars-d-learn mailing list