-
Notifications
You must be signed in to change notification settings - Fork 146
fix: libduckdb-sys build fails on Windows #495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
In my testing, this PR resolves a portion of the issues. There are still some other errors:
This error can be fixed by the following code (from AI): println!("cargo:rustc-link-lib=dylib=Rstrtmgr");
println!("cargo:rustc-link-lib=dylib=Bcrypt"); For me, this resolved all the errors I was encountering while building libduckdb-sys on Windows. |
I found the following some lines in CMakeList.txt https://github.com/duckdb/duckdb/blob/7c039464e452ddc3330e2691d3fa6d305521d09b/src/CMakeLists.txt#L33 These lines add Ws2_32, Rstrtmgr and Bcrypt to the link targets when using MSVC. |
Previously, any version of Anyway, I believe the following code can solve all build errors on Windows: // ...
.flag_if_supported("/utf-8")
// ...
println!("cargo:rustc-link-lib=dylib=Rstrtmgr");
println!("cargo:rustc-link-lib=dylib=Bcrypt"); |
Fix libduckdb-sys build failure on Windows related to #268 (possibly also related to #482 and #413).
Added a line to libduckdb-sys/build.rs to specify the encoding when compiling C code.