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

how to compile in debug mode #11

Closed
tang1485 opened this issue Nov 24, 2020 · 2 comments
Closed

how to compile in debug mode #11

tang1485 opened this issue Nov 24, 2020 · 2 comments

Comments

@tang1485
Copy link

I compile in debug mode in VS2019, Win10. all configures are in debug mode when configure cmake-gui. FBXSDK is debug version lib.

but it seems Alembic from Alembic (from Maya 2020 Update 2 DevKit) only contains release libs. How to get Debug version Alembic? Should I compile Alembic from https://github.com/alembic/alembic? Then how to organize the catalogue? Which version of Alembic (from Maya 2020 Update 2 DevKit) is?

The compile error is:
1>Alembic.lib(DataTypeRegistry.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>Alembic.lib(SprImpl.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>Alembic.lib(SprImpl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>Alembic.lib(AprImpl.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>Alembic.lib(AprImpl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>Alembic.lib(ScalarPropertyWriter.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>Alembic.lib(ScalarPropertyWriter.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>Alembic.lib(ArrayPropertyWriter.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>Alembic.lib(ArrayPropertyWriter.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>Alembic.lib(ArrayPropertyReader.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>Alembic.lib(ArrayPropertyReader.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>Alembic.lib(ScalarSample.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>Alembic.lib(ScalarSample.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>AlembicHalf.lib(half.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>AlembicHalf.lib(half.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>AlembicIex.lib(IexBaseExc.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>AlembicIex.lib(IexBaseExc.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 1>D:\Projects\dem-bones\build_debug\Debug\DemBones.exe : fatal error LNK1319: 184 mismatches detected 1>Done building project "DemBonesCmd.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

@binhhuyle
Copy link
Contributor

[Copied from previous email exchange]

BL: I have not tried to compile it in debug mode. If you want to do so, I believe you will need to compile Alembic yourself. It could be a little bit complicated because some third party libs for Alembic are Linux-originated. The Alembic lib from Maya's SDK was compiled by Autodesk. You will need to recompile it from ILM's source code: https://github.com/alembic/alembic

However, I do not see many reasons to do so because watching Eigen's matrices are quite inconvenient.

tang1485: Currently, I debug with the release build follow the link: https://docs.microsoft.com/en-us/cpp/build/how-to-debug-a-release-build?view=msvc-160 . It seems OK for me, currently. I will later build the debug version of Alembic.

@pramanc
Copy link
Contributor

pramanc commented Mar 24, 2021

I met the same problem, and I solved it by change DemBonesCmd's code generation->Runtime Library into Multi-threaded DLL(/MD)

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

3 participants