Importing D libraries

Nick Sabalausky a at a.a
Tue Jul 26 12:30:20 PDT 2011


"Pelle" <pelle.mansson at gmail.com> wrote in message 
news:op.vy74cwejzu79i9 at pelle-d2608-a1...
> On Tue, 26 Jul 2011 13:06:56 +0200, Dainius (GreatEmerald) 
> <pastas4 at gmail.com> wrote:
>
>> I updated the DMD and tried RDMD, but still no luck. Linker errors
>> galore. You can see all of them here: http://pastebin.com/C6cRVGKt
>
> You need to link the library as well, try adding -L-llua (I think) to the 
> command.

A better way to do it is just include this in your code:

pragma(lib, "lua"); // Assuming the lib file is named "lua.lib"

Benefits:
- One less cmd-line param.
- Should work the same on both windows and posix (the linker args are 
completely different between windows and posix).




More information about the Digitalmars-d-learn mailing list