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

Debug build installs release dependency libraries #967

Open
ELeeScape opened this issue Oct 22, 2024 · 1 comment
Open

Debug build installs release dependency libraries #967

ELeeScape opened this issue Oct 22, 2024 · 1 comment

Comments

@ELeeScape
Copy link

ELeeScape commented Oct 22, 2024

In PR #820, specifically this commit, a bunch of changes were made to accommodate the special needs of cesium-unreal, including the fact that the Unreal Engine doesn't have a real debug build; even the debug build of UE links to the release CRT libs, so the debug build of cesium-unreal also links to the release CRT libs, and that cascaded back to cesium-native where as of #820 even a debug build installs the release versions of all of its dependencies (though the Cesium libs themselves are debug versions). This means you can't do a debug build of cesium-native and then link it to a typical debug build of some client other than cesium-unreal, because the CRT lib types will be all mismatched.

The result when you try (at least on Windows with MSVC) is a bunch of errors that look like this:

error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2'
error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' 

The fix (I think) is that /CMakeLists.txt needs to install libs from ${PACKAGE_DIR}/debug/lib/ (here and here) if it's a debug config AND some special Unreal flag isn't set, otherwise install libs from ${PACKAGE_DIR}/lib/. I'm not sure how to best detect the Unreal condition, though, so I'll leave it to someone who know what they're doing to come up with the PR.

@lilleyse
Copy link
Contributor

lilleyse commented Oct 22, 2024

@ELeeScape this should be fixed in #962. I haven't tested it in Unreal though.

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

2 participants