MINGW: Can't compile
gregoiregentil opened this issue · comments
I'm trying to compile latest (as of March 16, 2024) on mingw and it's failing.
I run: sh configure --host=x86_64-mingw32 --with-libusb0="..\libusb-win32-1.2.7.3" and then make.
It reports an error:
make all-recursive
make[1]: Entering directory '/cygdrive/c/Users/Gregoire Gentil/ai.inout/usbRecover/libwdi'
Making all in libwdi
make[2]: Entering directory '/cygdrive/c/Users/Gregoire Gentil/ai.inout/usbRecover/libwdi/libwdi'
CC installer_x86-installer.o
In file included from installer.c:35:
msapi_utf8.h:30:10: fatal error: direct.h: No such file or directory
30 | #include <direct.h>
What am I doing wrong?
No issue compiling with latest MinGW on Windows.
I would encourage you to invoke ./bootstrap.sh
and then ./configure <your options
. Also see https://github.com/pbatard/libwdi/wiki/Install as I suspect this part is relevant to you:
If cross-compiling, and if the default CC (as detected by configure) does not produce executables that can run on your platform, define a CC_FOR_BUILD environment variable with the required options.