Sun, 12/15/2024 - 01:25
Forums:
When building from the 7.8.1 tag with Draco compression, I didn't encounter any problems.
But after moving to the latest OCCT in master branch and building, I'm getting several errors like this one:
47>draco.lib(float_points_tree_decoder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in RWGltf_CafReader.obj
47>draco.lib(mesh_misc_functions.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in RWGltf_CafReader.obj
47>draco.lib(mesh_misc_functions.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in RWGltf_CafReader.obj
47>draco.lib(attributes_encoder.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in RWGltf_CafReader.obj
47>draco.lib(attributes_encoder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in RWGltf_CafReader.obj
47>draco.lib(sequential_attribute_encoder.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in RWGltf_CafReader.obj
I've been using the draco 1.4.1 library package that's linked here on the site, so I tried building from the source and still got this result.
Is there a workaround for this?
Sun, 12/15/2024 - 15:07
Hello. It is a regression after some fix. The possible workaround is to change 3RDPARTY_DRACO_LIBRARY to be equal with 3RDPARTY_DRACO_LIBRARY_DEBUG. And build like that.
I will fix that issue on current week master. My apologies. You are welcome to report your bugs directly: Reporting bugs or feature request in GitHub
Best regards, Dmitrii.
Sun, 12/15/2024 - 15:36
PR: Configuration - Debug Draco linking issue Soon will be merged to master
Best regards, Dmitrii.
Sun, 12/15/2024 - 15:50
Thanks Dmitrii. In the meantime I found where the problem is. After CONFIGURE_DRACO_DEPS was moved from occt_toolkit.cmake to 3rdparty_macro.cmake, the lines:
```
if ("${CURRENT_CSF}" STREQUAL "${CSF_Draco}")
set (CURRENT_CSF "")
```
were removed from occt_toolkit.cmake.
That means that now the release library is included twice, once from each cmake file. If that condition is restored to occt_toolkit, it will only be included once.
Sun, 12/15/2024 - 19:15
Ah, I replied before refreshing. I see your PR now which is much more thorough. Thanks!