D calling C?

torhu fake at address.dude
Sat Mar 3 20:55:23 PST 2007


Glenn Lewis wrote:
> Hi!  I'm trying to write a D program that calls C.
> I've attached two listings: t1.d and t2.cpp.
> Here's what happens:
> 
> C:\tmp>dmd -c t1.d
> C:\tmp>dmc -c t2.cpp
> C:\tmp>dmd -oft1.exe t1.obj t2.obj
> C:\dmd\bin\..\..\dm\bin\link.exe t1+t2,t1.exe,,user32+kernel32/noi;
> C:\tmp>t1
> Error: Access Violation
> 
> I'm using DMD version 1.006 and DMC version 8.42n on WinXP.
> Anyone have any ideas why this doesn't work?

The attachments are not understood by thunderbird, they are just shown 
inline in some kind of unreadable encoding.  Maybe you could just paste 
the sources into the message?



More information about the Digitalmars-d mailing list