You are chasing a red herring here. There is no way I can see in which the build configuration of your project could have any effect on the runtime behavior except to cause errors in linking if you are somehow linking the same code more than once into a single binary (exe or dll). And if you get errors in linking, the exe or dll won't be built.

If you have common source code that is built into more than one binary, then you should isolate this code into its own static library and link that with each binary that needs it. But again, compiling and linking the same source code into different binaries should still not cause problems unless you are defining global variables or static member variables in classes in that code that end up being instantiated more than once.

If you are moving code around and are seeing crashes in different places, then I would say that something in your code is corrupting memory. It is a classic sign when a program crashes in a piece of code you aren't even aware you are using. The location of the crash is not the cause of the crash, it is just where the program tries to do something with the corrupted memory and goes off into limbo.