You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use GetUserNameExA(), cargo build tries to link to SspiCli.dl using non-existing file SspiCli.lib instead of Secur32.dll using Secur32.lib, and build fails. I have the Windows 10 SDK installed and Secur32.lib is included in the SDK, so linking with that would succeed.
Steps to reproduce
Create a new project with the following:
Cargo.toml
[package]
name = "seclib"
version = "0.1.0"
edition = "2018"
[dependencies]
windows = "0.5.0"
[build-dependencies]
windows = "0.5.0"
diff --git a/crates/gen/src/types/function.rs b/crates/gen/src/types/function.rs
index 9705ce2..82d4db9 100644
--- a/crates/gen/src/types/function.rs+++ b/crates/gen/src/types/function.rs@@ -49,6 +49,9 @@ impl Function {
if link.contains("-ms-win-") || link == "D3DCOMPILER_47" {
link = "onecoreuap";
}
+ if link == "SspiCli" {+ link = "secur32";+ }
if cfg!(windows) {
quote! {
When trying to use
GetUserNameExA()
,cargo build
tries to link toSspiCli.dl
using non-existing fileSspiCli.lib
instead ofSecur32.dll
usingSecur32.lib
, and build fails. I have the Windows 10 SDK installed and Secur32.lib is included in the SDK, so linking with that would succeed.Steps to reproduce
Create a new project with the following:
Cargo.toml
build.rs
src\main.rs
Expected results
project is linked with
secur32.dll
library and is linked successfully when executingcargo build
Actual results
cargo build tries to link to
SspiCli.dl
using non-existing fileSspiCli.lib
, and build failsThe text was updated successfully, but these errors were encountered: