Fix build on mingw64 gcc compiler

This commit is contained in:
Yasuhiro Matsumoto 2020-10-01 23:00:41 +09:00
parent 901058a62e
commit 48c7535d28
No known key found for this signature in database
GPG Key ID: 622DE34DC490584B
2 changed files with 12 additions and 0 deletions

View File

@ -28,6 +28,10 @@ fn get_config() -> PathBuf {
fn print_config() {
println!("cargo:rustc-link-lib=static=winbridge");
println!("cargo:rustc-link-lib=dylib=user32");
#[cfg(target_env = "gnu")]
println!("cargo:rustc-link-lib=dylib=gdiplus");
#[cfg(target_env = "gnu")]
println!("cargo:rustc-link-lib=dylib=stdc++");
}
#[cfg(target_os = "linux")]

View File

@ -27,7 +27,15 @@
#define UNICODE
#ifdef __MINGW32__
# ifndef WINVER
# define WINVER 0x0606
# endif
# define STRSAFE_NO_DEPRECATE
#endif
#include <windows.h>
#include <winuser.h>
#include <strsafe.h>
#include <shellapi.h>