-
Notifications
You must be signed in to change notification settings - Fork 18
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
mismatch detected for 'RuntimeLibrary' on windows #155
Comments
Hey @MHebes, Right now we've hardcoded static linking to the MSVC runtime libraries, but we're working on removing the limitation. Until we've merged those changes the temporary work around is to opt in for static linking of the runtime libraries yourself by similarly setting the |
I gotcha @fealebenpae—thanks so much for the link and info! Would you happen to have a sense of how hard it would be for me to monkey patch to build with dynamic linking? Assuming I didn't care about any platforms other than desktop windows (my project produces many binaries so static linking would be pretty burdensome). In other words, do you think that removing the |
You can certainly edit the listfile - there is a similar change in a submodule you have to make, but that's about it. However, there is the added complication of our dependencies on Windows - we rely on OpenSSL and zlib and the prebuilt copies we host and link against are also built to statically link the runtime libraries. You would need to provide your own copies of OpenSSL and zlib that satisfy CMake's The vcpkg integration PR I originally linked to is supposed to solve this generally, as we'll be pulling OpenSSL and zlib as vcpkg dependencies and vcpkg can build with the correct |
I am trying to build a basic hello world program, and am getting some linker errors.
I'm on windows with visual studio 2022 (
cl.exe
version isMicrosoft (R) C/C++ Optimizing Compiler Version 19.38.33130 for x86
).Just tons of static/dynamic linking errors, e.g.
Here's a MRE:
Commands:
There's a slightly suspicious line in the CMakeLists that may be related to the issue:
realm-cpp/CMakeLists.txt
Line 120 in 43a6881
Any thoughts on how I should fix this issue?
The text was updated successfully, but these errors were encountered: