Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Copied from teesseract library, which triggered this while being com…
…piled with this lib and several others in a monolithic build.] fix very nasty obscure crashes inside system std::xhash code when executing Tesseract Init code, loading the 'tesseract_best' English language file(s): - https://stackoverflow.com/questions/17885060/passing-reference-to-stl-vector-over-dll-boundary Though we DO NOT cross a DLL boundary with that stuff (all the relevant code is included in one single "monolithic" DLL and none of that C++ stuff got outside!) we still got inexplicable crashes this way. The KEY to fixing this: you MUST MAKE SURE ALL RELEVANT MSVC PROJECT FILES HAVE THE **EXACT** **SAME** COMPILER SETTINGS: this has now been 'fixed' for Debug/Win32 build mode only as a PoC: we haven't updated all libraries yet, but this was plenty enough to make the basic bulktest run succeed again (instead of crash fatally) when executing mudraw commands, writing to *.ocr.html output files. Also note another consequence of our C++ compiler settings fiddling: - https://stackoverflow.com/questions/5004858/why-is-stdmin-failing-when-windows-h-is-included we applied the `std::max<int>(a, b)` tweak mentioned there instead of looking for the propr place to plonk a NOMINMAX for windows.h as this was faster and easier, also when we consider future compiler settings changing again as we work on our 'update' script for vcxproj files (TODO!)
- Loading branch information