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,
OK, a minute after I sent the mail I figured out number two:
For vendor.dll the corresponding .def file has to be called libvendor.def.
I still need help with point one, though.
Thomas
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:
- 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
- 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.
I have a windows dll without source code (vendor.dll) that I want to use in a winelib application.
- 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
That seems to mean winedump isn't parsing this right, or that it truly has no exports. You want to debug winedump, perhaps by adding the -v flag to winedump. --Juan
On Sat, Aug 22, 2009 at 11:17 AM, Juan Langjuan.lang@gmail.com wrote:
- 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
That seems to mean winedump isn't parsing this right, or that it truly has no exports. You want to debug winedump, perhaps by adding the -v flag to winedump.
You can use something like dependancy walker to verify the function names that it exports.
Hi,
The Dll exports its function names using the __stdcall decorations e.g. _GetLibraryVersion@0. Windows OS Dlls also provide an undecorated name (GetLibraryVersion) which winedump expects. While it would be easy to fix winedump I'm not sure this would suffice. Especially I don't know if it's actually possible to call decorated Dll functions from a winelib application.
Therefore I'm going to use LoadLibrary et.al. which is a bit tiresome with 300 exported functions but at least is guaranteed to work.
Thomas