Skip to content

Commit 498b053

Browse files
authored
Merge pull request compuphase#32 from SFE-Brudnerd/fix-mingw-build-process
Fix mingw build process
2 parents 747334b + 51d67df commit 498b053

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

‎README.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,16 @@ A makefile is provided for MingW, called `Makefile.mingw`.
7676

7777
The current release links to either WinUSB or libusbK dynamically. It is no longer necessary to get the headers for WinUSB from the Windows DDK or create an import library from a .def file. However, for the libusbK option, you will need to download the appropriate libusbK.dll and place it into the directory where the binaries are built. See the [libusbK project](https://sourceforge.net/projects/libusbk/).
7878

79+
To generate the `.res` files, use MingW's `windres` function as follows:
80+
```
81+
windres -O coff -J rc -i file.rc -o file.res
82+
```
83+
84+
You'll also need to install fontconfig with:
85+
86+
```
87+
pacman -S mingw-w64-x86_64-fontconfig
88+
```
89+
7990
### Windows with Visual C/C++
8091
The makefile for Visual C/C++ (`Makefile.msvc`) uses Microsoft's `nmake`, which is a bare-bones `make` clone.

‎source/bmserial.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
# include <sys/stat.h>
3232
# include "strlcpy.h"
3333
# elif defined _MSC_VER
34+
# include <sys/stat.h>
3435
# include "strlcpy.h"
3536
# define access(p,m) _access((p),(m))
3637
# endif

‎source/decodectf.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#if defined __linux__
2828
# include <bsd/string.h>
2929
#elif defined __MINGW32__ || defined __MINGW64__ || defined _MSC_VER
30+
# include <malloc.h>
3031
# include "strlcpy.h"
3132
#else
3233
# include <alloca.h>

‎source/demangle.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
#if defined __POCC__ || defined __MINGW32__ || defined __MINGW64__
2727
# include <stdlib.h>
28+
#elif defined __MINGW32__ || defined __MINGW64__
29+
# include <malloc.h>
2830
#else
2931
# include <alloca.h>
3032
#endif

0 commit comments

Comments
 (0)