I am debugging a C program with multiple threads (std=C11). Its Release version runs but cannot output the correct result. But Its Debug version runs right.
I have read few posts on stack-overflow and check it carefully. I find the options [/MD /MDd /MT /MTd] are the key.
- Its Release version with
/MD,/MTgoes WRONG. - But Its Release version with
/MDd,/MTdgoes RIGHT.
I think that debug version of multi-threaded dynamic (DLL) runtimes may change something.
But I can not provide a example for it.
How can I solve or avoid this problem? Can you provide a example to explain the difference of them?
Refer Links