I’m currently working on a project which led me to re-implement a specific DLL using Wine. To be able to compile the C code with the coresponding .spec file into both a 32-bit and a 64-bit shared object capable of being loaded from Wine processes, I have installed the following packages on my OpenSUSE Tumbleweed machine:
- wine
- wine-32bit
- wine-devel
- wine-devel-32bit
Code: Select all
winegcc -m32 -L/usr/lib64/wine/i386-unix -shared -o myproject.dll myproject_main.c myproject.spec
Code: Select all
winegcc -L/usr/lib64/wine/x86_64-unix -shared -o myproject64.dll myproject_main.c myproject.spec
Code: Select all
/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: cannot find -ladvapi32: No such file or directory
/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: cannot find -luser32: No such file or directory
/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: cannot find -lwinecrt0: No such file or directory
/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: cannot find -lkernel32: No such file or directory
/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: cannot find -lntdll: No such file or directory
collect2: error: ld returned 1 exit status
winegcc: /usr/bin/gcc failed
I suspect this is because /usr/lib64/wine/x86_64-unix is missing all of the above archive files (e.g. libkernel32.a), but /usr/lib/wine/i386-unix has these archive files. Trying to use the archive files from /usr/lib64/wine/x86_64-windows instead, LD complains it cannot link between ELF and PE binaries:
Code: Select all
/usr/bin/ld: relocatable linking with relocations from format pe-x86-64 (/usr/lib64/wine/x86_64-windows/libwinecrt0.a(debug.o)) to format elf64-x86-64 (tmp66fd686a/myproject64-00000001.spec-00000001.o) is not supported
winebuild: /usr/bin/ld failed with status 1
winegcc: /usr/bin/winebuild failed
I feel like I should be able to compile my project as a 64-bit binary (I’m on a 64-bit machine). Is this assumption wrong, am I doing something wrong or are the packages missing some files?
I’d be grateful for any advice as I’ve been stuck in this situation for quite a while now.