diff --git a/CHANGES.md b/CHANGES.md index 9af3bfa356..ed99c47da8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -72,6 +72,7 @@ Bug Fixes * [#633](https://github.com/java-native-access/jna/pull/633): Restore default usage of platform native encoding for Java strings passed to native functions (was hard-coded to UTF-8 in 4.0 and later) [@amake](https://github.com/amake) * [#634](https://github.com/java-native-access/jna/pull/634): Improve BSTR handling and add `SysStringByteLen` and `SysStringLen` to `com.sun.jna.platform.win32.OleAuto` - [@matthiasblaesing](https://github.com/matthiasblaesing). * [#646](https://github.com/java-native-access/jna/issues/646): `platform.win32.COM.COMBindingBaseObject` swallows reason if instantiation fails - [@matthiasblaesing](https://github.com/matthiasblaesing). +* [#636](https://github.com/java-native-access/jna/issues/636); Staticly link visual c++ runtime when building with MSVC - [@matthiasblaesing](https://github.com/matthiasblaesing). Release 4.2.1 ============= diff --git a/lib/native/win32-x86-64.jar b/lib/native/win32-x86-64.jar index 60006d32e7..a2879773ad 100755 Binary files a/lib/native/win32-x86-64.jar and b/lib/native/win32-x86-64.jar differ diff --git a/lib/native/win32-x86.jar b/lib/native/win32-x86.jar index 2270943425..f3320ed064 100644 Binary files a/lib/native/win32-x86.jar and b/lib/native/win32-x86.jar differ diff --git a/native/Makefile b/native/Makefile index 8e30e62aaa..54bbc39900 100644 --- a/native/Makefile +++ b/native/Makefile @@ -207,19 +207,24 @@ STRIP=@echo LIBPFX= LIBSFX=.dll TESTLIB_TRUNC=$(BUILD)/testlib-truncated.dll + ifeq ($(ARCH),amd64) MINGW_PREFIX?=x86_64-w64-mingw32- FFI_CONFIG+=--host=x86_64-w64-mingw32 -# Need windres from mingw distribution, even if building with MSVC -WINDRES=$(MINGW_PREFIX)windres -MINGW=$(MINGW_PREFIX)gcc else -MINGW_PREFIX?=i686-pc-mingw32- +FFI_CONFIG+=--host=i686-w64-mingw32 +MINGW_PREFIX?=i686-w64-mingw32- endif +# Need windres from mingw distribution, even if building with MSVC +WINDRES=$(MINGW_PREFIX)windres +MINGW=$(MINGW_PREFIX)gcc ifeq ($(USE_MSVC),true) # MS compiler CC=$(FFI_SRC)/msvcc.sh +ifneq ($(DYNAMIC_LIBFFI),true) +CDEFINES+=-DUSE_STATIC_RTL +endif COPT= CPP=cl -nologo -EP LD=link