In the company I am working in we have a management software, written by an external programmer. Let's call the software PK. PK was initially written in the 90s using C++. Since then it was regularely updated and maintained but in its core it always remained a software based on 90s technology.
We are currently in the process of migrating from Windows 7 to Windows 10 and I recieved one of the first Win 10 PCs in order to test if everything works as expected on the new OS. Everything worked but PK. PK suddenly had frequent crashes. I told the software developer that there are issues with PK under Win 10 but even after numerous updates and changes to the code we still had these crashes. The developer just couldn't figure out why it crashed although it seems to be related to the memory management of PK.
The last straw the developer saw, was to compile the software on my Win 10-PC. I compiled the source code with exactly the same version of Visual Studio 2008 and suddenly it worked. No more crashes.
So my question is:
Can it be that the same Code, compiled by the same compiler produces a different binary dependent on the version of Windows (Windows 7 and 10)?
And if so: Why?
Update: After a very long search we were able to get to the bottom of it. It was a rather complicated issue that involved differing network settings between Win 7 and 10 as well as some bugs in the software. As far as I can see the compilation on different OS had no direct effect on the bug. It worked on my PC and my PC alone when I executed the program locally but we had the same crashes on the Windows 10 PC of a colleague. Thank you all for your insights.