Skip to content

Commit 1dd3ba4

Browse files
committed
Prevent avrdude say: libwinpthread-1.dll no found error when build by mingw
1 parent 7908b3a commit 1dd3ba4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

avrdude-6.3.build.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ cd objdir
2020
PREFIX=`pwd`
2121
cd -
2222

23+
rm -rf avrdude-6.3
2324
git clone https://github.com/facchinm/avrdude.git avrdude-6.3 --depth 1
2425

2526
cd avrdude-6.3
@@ -44,6 +45,11 @@ CFLAGS="-DHAVE_LIBHIDAPI $CFLAGS"
4445
LIBS="-lhidapi -lsetupapi"
4546
fi
4647

48+
if [[ $OS == "Msys" ]] ; then
49+
CFLAGS="-DHAVE_LIBHIDAPI $CFLAGS"
50+
LIBS="-lhidapi -lsetupapi -Wl,-Bstatic -lwinpthread"
51+
fi
52+
4753
if [[ $OS == "Darwin" ]] ; then
4854
CFLAGS="-DHAVE_LIBHIDAPI $CFLAGS"
4955
LIBS="-lhidapi"

0 commit comments

Comments
 (0)