Closed fuzun closed 6 years ago
What do you mean "std" libraries?
Sorry it was a typo. I meant "STB" library, I am correcting it now. Which is actually only 1 file: stb_sprintf.h it seems.
In file it says that version is v1.02. But in the stated github address ( http://github.com/nothings/stb ) the current version is: v1.05.
I do not know if this fixes debugging issues (It needs to be updated anyway) but it sometimes become really annoying that I switch the crt version while debugging.
It will not solve debugging issues because it using some dangerous optimizations (like XASH_FASTSTR). And it does not work correctly on platforms that does not allow unaligned access too. Maybe just add debug detection in make/cmake files and do not use it on debug crt? I will check stb_sprintf and update it if needed.
@mittorn Okay so it will not be debug friendly.
I think instead of changing make files using macros may be better. Something like this in port.h (Assuming they are type compatible)
@mittorn debug and release configurations shouldn't differ as possible.
What's exactly don't work in debugging? I don't using VS debugger regularly, but when I do, everything works fine.
Format errors. (%f for printing int etc.)
I need to boot into Windows to look what is wrong with debugging, but for now I have removed hardcode in f5cedcc6a9fafef83386e288c8de57518bb83863.
Now you can disable it by disabling XASH_USE_STB_SPRINTF in CMake. Or just not pass this define to compiler, if you don't want to use it.
Stb libraries are outdated and they make debugging not so easy.