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

compiling example dyn_subscribe #172

Closed
thepperson opened this issue Oct 20, 2022 · 4 comments
Closed

compiling example dyn_subscribe #172

thepperson opened this issue Oct 20, 2022 · 4 comments
Labels
fix added A fix was added to an unreleased branch
Milestone

Comments

@thepperson
Copy link

I am trying to compile the dyn_sbuscribe example, but am running into a linking issue. I am using MSVC for the build.

note: libcrypto.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: unresolved external symbol __imp_GetProcessWindowStation referenced in function OPENSSL_isservice
libcrypto.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: unresolved external symbol __imp_GetUserObjectInformationW referenced in function OPENSSL_isservice libcrypto.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: unresolved external symbol __imp_MessageBoxW referenced in function OPENSSL_showfatal

@fpagliughi
Copy link
Contributor

Which version of...

  • Windows
  • MSVC compiler (Visual Studio?)
  • OpenSSL Library?

@thepperson
Copy link
Author

Windows 10, Visual Studio 2022, openssl 3.0.5 (installed with vcpkg)

@fpagliughi
Copy link
Contributor

Thanks. I'll try the Windows builds this week.

A quick Internet search finds a similar complaint in another Rust library:
OSSystems/compress-tools-rs#57

Their fix seems to be manually linking in the Windows library in build.rs, like:

println!("cargo:rustc-link-lib=User32");

I wonder if that would work for us.

@fpagliughi fpagliughi added this to the v0.12.0 milestone Jan 9, 2023
@fpagliughi
Copy link
Contributor

I wasn't able to recreate the problem - possibly because I haven't upgraded to VS 2022 yet (?). But I added the line to the build file to link in User32 on Windows. Hopefully that helps.

@fpagliughi fpagliughi added the fix added A fix was added to an unreleased branch label Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix added A fix was added to an unreleased branch
Projects
None yet
Development

No branches or pull requests

2 participants