Linking a winelib application with a windows dll
André Hentschel
nerv at dawncrow.de
Sat Aug 22 10:09:38 CDT 2009
Thomas Trummer schrieb:
> Hi,
>
> I have a windows dll without source code (vendor.dll) that I want to use
> in a winelib application.
>
> There are two problems however:
>
> 1) Creating a vendor.def file doesn't work. The resulting file has an
> empty EXPORTS section:
>
> winedump spec vendor.dll
> winebuild --def -E vendor.spec -o vendor.def
>
>
> 2) According to an older mailing post it should be possbile to use the
> .def file to link:
>
> winegcc -o test test.o -lvendor
>
> However, this fails:
>
> /usr/bin/ld: cannot find -lvendor
> collect2: ld returned 1 exit status
> winegcc: i486-linux-gnu-gcc failed
>
>
> Thomas
>
>
> ------------------------------------------------------------------------
>
>
Hi Thomas,
You need the Headerfile for your dll. If you got it and put it in the same Folder you can run:
winedump spec -I . vendor.dll
-I specifies the path where to search for function prototypes, so the spec-file doesnt include only stubs.
Stubs are ignored when generating a def file.
Of course you also can rewrite the stubs into stdcalls by yourself, but i bet you wont.
--
Best Regards, André Hentschel
More information about the wine-devel
mailing list