link from a dll to another function in another dll?

maarten van damme maartenvd1994 at gmail.com
Sat Apr 30 02:47:53 PDT 2011


I've changed this, I think I'm still kinda confused with lib files. They've
told me you can't do something with them without a .di file
So I went ahead and made a kernel33.di file. I now import it in kernel32.d
and my declaration is
System(C){
export void * exportedfunctionblablabal(){
   return exportedfunctionblablablal();
}
...
}

The file in the directory are:
kernel32.d : http://dl.dropbox.com/u/15024434/d/kernel32.d
kernel33.di : http://dl.dropbox.com/u/15024434/d/kernel33.di
kernel33.lib : http://dl.dropbox.com/u/15024434/d/kernel33.lib
kernel33.dll : http://dl.dropbox.com/u/15024434/d/kernel33.dll

I've tried to compile using dmd -d kernel32.d kernel33.di kernel33.lib but
it throws errors like
"Error 42: Symbol undifined _Dkernel1336_hreadfzpV"
I have literally no clue why this is the case, can someone help me out or
look at the files?

2011/4/27 maarten van damme <maartenvd1994 at gmail.com>

> I'm afraid I've been a little unclear.
> I've copied kernel32.dll from the windows dir, renamed it to kernel33.dll
> and generated a .lib from it using implib.
> Then I've created a d file with a correct dllmain(stolen from examples) and
> between
>
> system(C){
> export void * exportedfunctionfromkernel33.dll();
> export void * exportedfunction2fromkernel33.dll();
> ...
> }
>
> But it looks like you can't both declare a function from another lib and
> export it at the same time.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110430/105bb83d/attachment.html>


More information about the Digitalmars-d mailing list