hi all.
sorry in case this email will get delivered twice to the list. i subscribed yesterday an promptly used the wrong mail address to post. so here i post again.
i'm stuck at the process of loading PE dlls.
like some others before me, i've got a native w32 dll which i would like to hook into on a linux box. no source code available. the case is almost identical to
http://www.winehq.com/hypermail/wine-devel/2003/12/index.html#231
though, there's not much application code yet, except a small test program written by myself, currently only meant to call a single function on the dll.
so, using winemaker does not seem to spit out anything usable, and there seems to be no official documentation on how to use winebuild here.
the program is called test.c, calling symbols from a vendor-supplied header file. created test.o through winegcc:
winegcc -Wall -O2 -I. -c -o test.o test.c
let's call the library vendor.dll again. i've played with winedump, finally got a vendor.dll.spec.
i'm calling winebuild to get a .def as follows:
winebuild --def -E vendor.dll.spec -o libvendor.def
then, one of my better guesses on how to proceed seemed to be:
winebuild --dll -fPIC -E vendor.dll.spec -L. -lvendor test.o -o libvendor.dll.s
the assembler code looks reasonable. though, linking fails with duplicate symbols:
winegcc test.o libvendor.dll.o -o test [..] : multiple definition of `__wine_spec_nt_header'
: multiple definition of `__wine_spec_file_name'
i'm aware that i could probably avoid all of this by just using LoadLibrary() and resolving the symbols at runtime. otoh, the approach above is potentially simpler, if i just knew how. :)
could someone please enlighten me? what am i doing wrong?
thanks, daniel