Closed anerwolf closed 5 years ago
Debug mode should work fine, could you paste some of your errors here?
What settings do I have to set besides building also third party libs in debug? I always run into erros like:
error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in file.obj.
Make sure you follow all the steps in the guide from the start and that should address your issue, let me know if it doesn't
I followed all steps except building all third party libs and orb slam in debug mode. Now I want to build an example in debug mode and it says:
Could not open "..\Thirdparty\DBoW2\lib\Release\DBoW2.lib".
Does this mean it still uses the release libs and I have to build all third party also in release mode?
You need to build the third party libs as the steps specify, you can’t skip any steps, please do that
I build everything as specified in the readme and it is working in release mode. How do I get to run mono_euroc in debug now? Just turn build type to debug won't make it.
You have to go back and run all the steps in debug mode as well
Done. Now when I true to run an example I receive errors with pangolin. Here are some of them:
`pangolin.lib(handler.obj) : error LNK2038: Konflikt ermittelt für "_ITERATOR_DEBUG_LEVEL": Der Wert "2" stimmt nicht mit dem Wert "0" in mono_euroc.obj überein.
1>pangolin.lib(handler.obj) : error LNK2038: Konflikt ermittelt für "RuntimeLibrary": Der Wert "MTd_StaticDebug" stimmt nicht mit dem Wert "MT_StaticRelease" in mono_euroc.obj überein.
1>pangolin.lib(display.obj) : error LNK2038: Konflikt ermittelt für "_ITERATOR_DEBUG_LEVEL": Der Wert "2" stimmt nicht mit dem Wert "0" in mono_euroc.obj überein.
1>pangolin.lib(display.obj) : error LNK2038: Konflikt ermittelt für "RuntimeLibrary": Der Wert "MTd_StaticDebug" stimmt nicht mit dem Wert "MT_StaticRelease" in mono_euroc.obj überein.
1>pangolin.lib(opengl_render_state.obj) : error LNK2038: Konflikt ermittelt für "_ITERATOR_DEBUG_LEVEL": Der Wert "2" stimmt nicht mit dem Wert "0" in mono_euroc.obj überein.
1>pangolin.lib(opengl_render_state.obj) : error LNK2038: Konflikt ermittelt für "RuntimeLibrary": Der Wert "MTd_StaticDebug" stimmt nicht mit dem Wert "MT_StaticRelease" in mono_euroc.obj überein.
1>pangolin.lib(display_win.obj) : error LNK2038: Konflikt ermittelt für "_ITERATOR_DEBUG_LEVEL": Der Wert "2" stimmt nicht mit dem Wert "0" in mono_euroc.obj überein.
1>pangolin.lib(display_win.obj) : error LNK2038: Konflikt ermittelt für "RuntimeLibrary": Der Wert "MTd_StaticDebug" stimmt nicht mit dem Wert "MT_StaticRelease" in mono_euroc.obj überein.`
@thohemp I had the exact same issues when I used the Win32 Visual Studio CMake build configuration. Make sure you always use x64! Also different to the installation guide (http://nicolas.baumgardt.ch/slam/ORBSLAM2_Install_Guide_Win10.pdf) I used Visual Studio 2017. Further I had to change two paths in the Example projects linker properties to the Debug instead of Release folders.
How did you manage to get it work @kaszc ? I also changed the two path tothe debug folders, but I still receive 257 errors.
I build all Thirdparty dependencies (DBoW2, g2o & Pangolin) according to the guide (http://nicolas.baumgardt.ch/slam/ORBSLAM2_Install_Guide_Win10.pdf) but instead of changing the build type in VS to Release I kept it in Debug. Make sure you always use x64 when configuring the build in CMake. I used VS 2017, OpenCV 3.4.1 and CMake 3.14.0. Afterwards I build the orb-slam project also in Debug and it told me that it couldn't find pangolin.lib and g2o.lib because the dependency paths in the linker were still set to the Release folders. Then it compiled. So the guide is correct as far as I can judge. You just have to adapt for Debug build and locations.
Later I ran into an issue where the program crashed in debug while deallocating a vector on the heap as of mixed dll <=> lib usage. (https://stackoverflow.com/questions/35310117/debug-assertion-failed-expression-acrt-first-block-header) I changed this vector to be a pointer to a vector, so it doesn't go to the heap in the first place. ;)
Thanks for the guideline. I had to change all pangolin projects to /MT in order to get it started. It is working now. Yet, I am surprised how slow the debug modus is.
Good to hear :) thank you for your help kaszc!
I am trying to run the mono_euroc with debug mode and not release. there seem to be a lot of errors. have you encountered such a problem? (i builded all third party also in debug)