Making a DLL with a static library dependency

Phil Deets pjdeets2 at
Thu Dec 17 05:32:41 PST 2009

On Tue, 15 Dec 2009 00:56:12 -0500, Phil Deets <pjdeets2 at> wrote:

> (D 2.033) I'm porting a DLL to D. The DLL depends on a static library,  
> but when I put the library name on the command-line, dmd does not output  
> any DLL file. If I remove the library name from the command-line, dmd  
> gives linker errors and outputs an invalid DLL. How do I make a DLL with  
> a static library dependency?

(now using D 2.037) I used optlink separately from dmd to see whether the  
problem is in dmd or optlink. It turns out to be an optlink issue.  
Everything works fine when I link in phobos.lib and kernel32.lib, but as  
soon as I link in lua51.lib there is no dll output. Could this be because  
I compiled lua51.dll/.lib with Visual Studio? I'll try compiling Lua with  

More information about the Digitalmars-d-learn mailing list