Using winemaker / building wine DLLs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

I'm not sure if this is the correct place for this question, or if the
wine-devel list is more appropriate; please let me know if I should ask
over there.

I'm trying to build, using winemaker/winegcc/etc, a DLL for use with a
Windows binary. This is a somewhat unusual case, in that this library is
actually explicitly being written for a Windows binary that will run in
Linux (I'm basically trying to wrap a Linux system call so that I can
call it from a Windows program).

So, I followed the guide at
http://www.winehq.org/docs/winelib-guide/bindlls, and winemaker gave me
a makefile. I ran winemaker with:

winemaker --nosource-fix --dll --single-target MyLib --nomfc

Running make produced errors related to 32/64-bit incompatibility, which
persisted until I:

1. added -m32 to CEXTRA and
2. added an explicit target for .o files (since the implicit target
doesn't use CEXTRA)

This made the compile fail with errors about missing WinMain, which
makes sense because -shared isn't being specified for compiling the .so.
So, I hacked the makefile again and added -m32, -shared, and -fpic to
MyLib_LDFLAGS.

This finally succeeded, but it only gave me a MyLib.dll.so file; my
understanding is that there should also be a MyLib.so file that I link
against when compiling my Windows binary.

I suspect I'm missing some fundamental assumption about Windows binaries
- that, or the way winemaker is supposed to be used has changed
drastically since that guide was written.

Can anyone give me any pointers here?

Thanks,
- Anna

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-users/attachments/20110621/80121d8a/attachment.pgp>



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux