Re: Trouble compiling Winelib DLL for 64-bit on OpenSUSE
Stefan Dösinger <[email protected]>
| Newsgroups | gmane.comp.emulators.wine.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Alexander, Am Dienstag, 15. Oktober 2024, 15:18:57 GMT+3 schrieb [email protected]: > I have previously asked about the problem I'm describing below on openSUSE's > forums [1], StackOverflow [2] and Wine's forums [3], where dimesio told me > that I could try to ask here. If this is the wrong place to ask, I > apologise. The mailing ist is the right place to ask :-) I'll try to answer some of your questions below, but I am not much of a winelib expert and sadly winelib is getting relatively little love. In my quick test building a 32 and 64 bit .dll.so worked, but I would not be surprised if there are bugs. Wine itself has transitioned to a more formal (fake-)syscall and unix call interface to switch between the Windows and the Linux side. I think there are no DLLs left in Wine any more that have the old hybrid PE and ELF linkage. > winegcc -m32 -L/usr/lib64/wine/i386-unix -shared -o myproject.dll > myproject_main.c myproject.spec Does the 32 bit DLL link without the -L path? You shouldn't need it, winegcc and winebuild should know their installation path. > As I've discovered, openSUSE's wine-devel package does not provide any > archive files in /usr/lib64/wine/x86_64-unix, whereas wine-devel-32bit does > provide archive files under /usr/lib/wine/i386-unix (symlinked with the > same directory in /usr/lib64). It is quite likely a bug on openSUSE's side. They probably didn't even test winegcc with the wine-devel packages, as it is a pretty rare case that someone needs it. I think your best choice would be to build wine from source and install it to a custom prefix in your home directory. Hopefully the wine-devel packages pull in the right headers etc to make it easy to do. e.g. in pseudo code: ./configure --enable-win64 --prefix=~/mywine make && make install # no need for sudo. add -j X for faster build export PATH=~/mywine/bin:$PATH Now you should run winegcc from ~/mywine/bin/winegcc, and it has the 64 bit .a files in ~/mywine/lib/wine/x86_64-unix. Any .dll.so generated that way should run with your system wide wine installation, so you should be able to copy it to other machines etc. If in doubt check out the oldest Wine version you want your binaries to run on.
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEQxb0tqoFWyeVMl1sPRO8yFRPGiIFAmcO07MACgkQPRO8yFRP GiKYXQ/9E842O5ZmOx1fSlnSCsrK3jrdXsvwA9mAdRNZPAAzuYpiuuXqkYTxix+7 WaTmBCnNsfnd2alXMM3pslz4jb6zntFNO+5S54aKkivSRFdCEV7LPV/BwOIERAR4 qLdg0JFhPvCoMYaQg5Vws7VKGjkEyiG3HBand3C9/fZ6Bhyz4iveL0paeLI2dJdf DFHIhPgWYkxdq7igl3hgZsxTiHRCXlqwLjUA9XgogxPiYE3ogsCLk0fNx7ygpAXn tS2XaAHZnuz+M02xCLlTR+GnApMYVz4GT2E3WlTwbWjJcc/YP1bH4D3fLw6Q27QT ktgwCvUnC5UA3h4dVLS63cvHoieTk0ClP1kWanoJsT8MK9+HwzU0sytHCNQlbRaR sWl+YhxIsv8+nAZm7pyHhJzOZka99ur4EQhIjEKDoX+al4XKjkIcTT5gNB9rJ4pz AqSh20kKnmJ1RAK1pIRJlStpZSVoKJlt0B0qdIPU0++4bzLoxm6dwIraMTxaxEYL mWy2/mTBaNtNJEY2Qb3n5DVMla5nYQDM1TIb2/CpkzjBurF2e/M1re/L25e2WC00 wSI6WpbOqIrg+zfqiLGKOASOeKph6WJgNR4DhY+8u5aTxNuHSHsTVHVlXQ8YAe3z xcxAHri774QpHWS8V5nPXiLdeSMYUjBAqbtv5H2IMWhP2YG8Qc8= =JYcx -----END PGP SIGNATURE-----