Open AidaPaul opened 4 years ago
I managed to make it working with mingw64 from msys2. The main problem is that it is incorrect to make decisions only checking
#if (defined(_WIN32) || defined(_WIN64))
we also need to check #if defined (_MSC_VER)
or defined(__MINGW32__) || defined(__MINGW64__)
. Also build.rs should check not only for target OS but also check the toolchain
fn find_link_lib<P>(install_path: P) -> Option<(PathBuf, &'static str)>
where
P: AsRef<Path>,
{
let install_path = install_path.as_ref();
let lib_dirs = &["lib", "lib64"];
let lib_base = link_lib_base();
let lib_file = if cfg!(windows) {
if cfg!(gnu) {
format!("lib{}.a", lib_base)
} else {
format!("{}.lib", lib_base)
}
} else {
format!("lib{}.a", lib_base)
};
Sadly my attepts to get it up and running with gnu toolchain + msys on windows yielded no luck.
toolchain:
stable-x86_64-pc-windows-gnu
cargo build
:And
cargo build --no-default-features --features "bundled"
for good measure:This is separate from #45 as that issue tries to build with MSVC toolchain. Any help would be greatly appreciated!