Skip to content
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

staticlib #120

Open
kouzhudong opened this issue Mar 4, 2024 · 0 comments
Open

staticlib #120

kouzhudong opened this issue Mar 4, 2024 · 0 comments

Comments

@kouzhudong
Copy link

When I use this warehouse to create a static library, the compilation is successful. However, when I connect this static library to a driver (written in c/cpp/rust), a connection error occurs.

1>Ntstrsafe.lib(stubs.obj) : error LNK2005: _fltused 已经在 lib_drv_rs.lib(lib_drv_rs-7edd6e2e9cf34bd7.wdk_alloc-2f7aa50fc157ee7f.wdk_alloc.c21c9f9d55100c01-cgu.0.rcgu.o.rcgu.o) 中定义
1>lib_drv_rs.lib(lib_drv_rs-7edd6e2e9cf34bd7.wdk_alloc-2f7aa50fc157ee7f.wdk_alloc.c21c9f9d55100c01-cgu.0.rcgu.o.rcgu.o) : error LNK2019: 无法解析的外部符号 WdfFunctions_01033,函数 _ZN4core3ops8function6FnOnce9call_once17hae8e3e88db06564dE 中引用了该符号
D:\git\gitlab\code\test\rust\src\wdm_rs>cargo build
   Compiling wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs)
   Compiling wdk-sys v0.2.0
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
error: language item required, but not found: `eh_personality`
  |
  = note: this can occur when a binary crate with `#![no_std]` is compiled for a target where `eh_personality` is defined in the standard library
  = help: you may be able to compile for a target that doesn't need `eh_personality`, specify a target with `--target` or in `.cargo/config`

The following warnings were emitted during compilation:

warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.

error: could not compile `wdm_lib_rs` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

D:\git\gitlab\code\test\rust\src\wdm_rs>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant