Using a windows dll from a winelib or possibly native linux app.

Boaz Harrosh boaz at hishome.net
Wed Dec 10 02:07:34 CST 2003


See if I understand what you need:
- vendor.dll (windows binary only)
- myapp.exe.so (winelib application that uses vendor.dll API and 
compiles against "vendor" header files )

Check that you have done the following
1) wrote a vendor.dll.spec (spec syntax for all functions used from 
"vendor" headers)
2) compiled a libvendor.def file from above .spec file using winebuild 
(put libvendor.def in a directory specified by -L)
<Makefile>
# libvendor.def generation
libvendor.def: vendor.dll.spec
    $(LDPATH) $(WINEBUILD) -fPIC -o $@  --def vendor.dll.spec \
    $(vendor_dll_DLL_PATH) $(WINE_DLL_PATH) $(GLOBAL_DLL_PATH) \
    $(vendor_dll_DLLS:%=-l%) $(GLOBAL_DLLS:%=-l%)
</Makefile>

3) make a myapp.exe.spec.c using winebuild including "vendor" to the 
list of needed dlls like kernel32 and advapi32 ...
    (this was done for you by winemaker Just add vendor at the end of 
the dlls list)
4) link myapp.exe.so with myapp.exe.spec.o (also done by winemaker)
5) Have vendor.dll available in runtime

Hope that helps
Free Life
Boaz

Arthur Bergman wrote:

> Hi,
>
> I have been trying to develop an application using a vendor provided 
> dll from an external vendor to work under linux. If we develop the app 
> on a windows box and move it over to the wine environment it works, 
> but it would be preferable to have a more native approach. So I tried 
> using winelib and have progressed to a point where I have an 
> application that compiles using the vendor supplied header files under 
> gcc, and a  vendor.dll.spec file that describes the DLL. However when 
> I compile everything, the generated vendor.dll.so file does contain 
> the correct symbols but they are undefined. Having played around using 
> winemaker and winedump while trying to read up everything on winelib I 
> am now stuck and not sure how to proceed forward.
>
> Thanks
> Arthur
>
>
>
>



More information about the wine-devel mailing list