Can't compile WSZST and WIT

      Can't compile WSZST and WIT

      Hey !
      I'm trying to compile WIT and WSZST from source (with cygwin x86_64 on windows 10). The point is to get DLLs versions of the tools because I would like to use them as ctypes python function (calling them by a subprocess is really slow), but I think I missed something as I keep getting error:

      with a make, the program compile successfully, but as a linux executable : Makefile think $(SYSTEM) is 86_64x instead of cygwin.
      by replacing $(SYSTEM) by cygwin in Makefile, the compilation return an error, saying that w32api/windows.h is missing :

      C-Quellcode

      1. *** object winapi.o -DDEBUG
      2. src/winapi.c:39:10: fatal error: w32api/windows.h: No such file or directory
      3. 39 | #include <w32api/windows.h>
      4. | ^~~~~~~~~~~~~~~~~~
      By adding w32api to the libs, it's still raising an error about io.h being missing :

      C-Quellcode

      1. src/winapi.c:44:10: fatal error: io.h: No such file or directory
      2. 44 | #include "io.h"
      3. | ^~~~~~
      4. compilation terminated.
      5. make: *** [Makefile:434: winapi.o] Error 1
      And by adding io.h from sys/io.h, an error still occur :

      C-Quellcode

      1. src/winapi.c:137: error: expected ‘{’ at end of input
      2. 137 |
      3. |
      4. In file included from w32api/minwindef.h:163,
      5. from w32api/windef.h:9,
      6. from ./w32api/windows.h:69,
      7. from src/winapi.c:39:
      8. w32api/winnt.h:154:25: note: the ABI of passing struct with a flexible array member has changed in GCC 4.4
      9. 154 | #define DECLSPEC_IMPORT __declspec (dllimport)
      10. | ^~~~~~~~~~
      11. w32api/winnt.h:276:18: note: in expansion of macro ‘DECLSPEC_IMPORT’
      12. 276 | #define NTSYSAPI DECLSPEC_IMPORT
      13. | ^~~~~~~~~~~~~~~
      14. w32api/winnt.h:7716:5: note: in expansion of macro ‘NTSYSAPI’
      15. 7716 | NTSYSAPI WORD NTAPI RtlCaptureStackBackTrace (DWORD FramesToSkip, DWORD FramesToCapture, PVOID *BackTrace, PDWORD BackTraceHash);
      16. | ^~~~~~~~
      17. src/winapi.c:137: warning: control reaches end of non-void function [-Wreturn-type]
      18. 137 |
      19. |
      Alles anzeigen
      I also tried with MinGW, but as excepted it doesn't work because of inet.h


      I've been trying for 2 days to just compile them to .exe files, but I just can't make it work. Do you have an idea about what I missed or if there's already a Dlls version of wszst, wbmgt, wit, ... ?
      Thanks for your answer


      I am using source from Wiimms github (github.com/Wiimm/wiimms-iso-tools and github.com/Wiimm/wiimms-szs-tools)

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Faraphel () aus folgendem Grund: added source's source (?)

      There's no existing DLL versions (or SO for Linux or DyLib for MacOS) of Wiimms tools, so you will need to compile them yourself.

      Cygwin on Windows is not capable of producing Linux executables. If you still get a Linux executable, you are not running Cygwin.
      Are you running make inside the WSL console? That'd explain why you get Linux binaries. If I remember correctly - it's been a very long time that I last used Cygwin for anything - you need to explicitly open up a Cygwin shell somehow before running make.

      DevkitPro Archiv (alte Versionen / old versions): wii.leseratte10.de/devkitPro/
      Want to donate for Wiimmfi and Wii-Homebrew.com? Patreon / PayPal

      Dieser Beitrag wurde bereits 0 mal editiert, zuletzt von Leseratte ()

      New issue : WIT compile correctly, but there's an issue with SZS :

      C-Quellcode

      1. /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: lib-breff.o:lib-breff.c:(.rdata+0x80): multiple definition of `MkwPointInfo'; db-mkw.o:db-mkw.c:(.rdata+0x6100): first defined here
      2. /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: lib-brres.o:lib-brres.c:(.rdata+0x3a0): multiple definition of `MkwPointInfo'; db-mkw.o:db-mkw.c:(.rdata+0x6100): first defined here
      3. /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: lib-checksum.o:lib-checksum.c:(.rdata+0x2a0): multiple definition of `MkwPointInfo'; db-mkw.o:db-mkw.c:(.rdata+0x6100): first defined here
      4. /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: lib-file.o:lib-file.c:(.rdata+0x1240): multiple definition of `MkwPointInfo'; db-mkw.o:db-mkw.c:(.rdata+0x6100): first defined here
      5. /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: lib-mkw.o:lib-mkw.c:(.rdata+0xc60): multiple definition of `MkwPointInfo'; db-mkw.o:db-mkw.c:(.rdata+0x6100): first defined here
      6. /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: lib-numeric.o:lib-numeric.c:(.rdata+0x780): multiple definition of `MkwPointInfo'; db-mkw.o:db-mkw.c:(.rdata+0x6100): first defined here
      7. /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: lib-pack.o:lib-pack.c:(.rdata+0x60): multiple definition of `MkwPointInfo'; db-mkw.o:db-mkw.c:(.rdata+0x6100): first defined here
      8. /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: lib-rarc.o:lib-rarc.c:(.rdata+0x60): multiple definition of `MkwPointInfo'; db-mkw.o:db-mkw.c:(.rdata+0x6100): first defined here
      9. /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: lib-rkc.o:lib-rkc.c:(.rdata+0xc0): multiple definition of `MkwPointInfo'; db-mkw.o:db-mkw.c:(.rdata+0x6100): first defined here
      10. /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: lib-std.o:lib-std.c:(.rdata+0x41e0): multiple definition of `MkwPointInfo'; db-mkw.o:db-mkw.c:(.rdata+0x6100): first defined here
      11. /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: lib-szs.o:lib-szs.c:(.rdata+0xa60): multiple definition of `MkwPointInfo'; db-mkw.o:db-mkw.c:(.rdata+0x6100): first defined here
      12. collect2: error: ld returned 1 exit status
      13. make: *** [Makefile:460: gen-ui] Error 1
      Alles anzeigen
      Still using make from the cygwin terminal, I didn't modified the source (github.com/Wiimm/wiimms-szs-tools)
      As of gcc 10, gcc defaults to -fno-common which apparently breaks the SZS tools. You can either try to use an older compiler (like gcc 9), or you try to modify the Makefile to add -fcommon to get back the old behaviour.

      DevkitPro Archiv (alte Versionen / old versions): wii.leseratte10.de/devkitPro/
      Want to donate for Wiimmfi and Wii-Homebrew.com? Patreon / PayPal

      Dieser Beitrag wurde bereits 0 mal editiert, zuletzt von Leseratte ()

      I fixed it. The bugs are 2 forgotten "extern" before the declarations of "MkwPointInfo" (in dclib/lib-mkw.h) and "addr_port_file" (in src/lib-staticr.h).

      Now it can be compiled independent of -fcommon.

      WIT: Wiimms ISO Tools
      Verwaltet Plain ISO, WDF, WIA, CISO, WBFS, FST: kann Extrahieren, Erstellen, Patchen, Mischen und Überprüfen

      SZS: Wiimms SZS Tools
      Verwaltet SZS-, BRRES-, U8-, BMG-, BREFT-Dateien uvm.



      PN ohne persönlichen Charakter werden ignoriert. Support-Anfragen gehören ins Forum.