I have developped a complex algorithm years ago. It is even difficult for me to understand it's structure now after years. But I want to use it now as a part in a new project. While trying to integrate this code in the new project, I got a bizarre phenomenon.
If I compile the code by VC++6, the algorithm works correct, in debug and release version. If I use the expression "incorrect" in the following here now, it does not mean that the algorithm makes completely wrong results, but results that are much worser in quality as I would call it "correct".
If I compile the same code by Visual Studio C++ 2010, the algorithm works incorrect (= low quality results) in the Releaase version. Same effect (bad results) if I start the exe-File that was produced by Debug-Compile and Link. But if I start the program in the VS2010 IDE, from "Debug->Start without debugging = F5", it makes correct results (= good quality, same results as with Debug+Release in VC++6). How is this possible ? Certainly the IDE starts the Debug-exe-File in another way as if it is started manually from command prompt. What is the setting, to get these results also in the Release version ?
I have changed all Project-Settings now, so that they are similar: Release = Debug. Especially I have switched off all optimizations. But there is still the effect that I get the correct results only if I start the program by Debug->Start in the IDE.
So I can not understand this effect, I get crazy cause of that, because I have tried everything to match that during the last three nights, without success. I have also tried it with Visual Studio 2017, with the same result as in VC++ 2010.
I have also tried to link a lib-file with the old code, that was compiled and linked by VC++6, in the new project in VC++ 2010. But in effect also this produces incorrect results (bad quality results).
I need a Release version that is runable in Windows 10 with the correct (good) results. I can not get this with VC++6, so that I need a solution for this bizarre effect please.
What I have tried:
I have also tried to link a lib-file with the old code, that was compiled and linked by VC++6, in the new project in VC++ 2010. But in effect also this produces incorrect results (bad quality results).