Following situation with Visual Studio: Since I have merged two former programs (just copied the files together and removed the main functions) into a DLL to use now from another program, I have a very strange effect:
The same static(!) variable is not actually the same in different files. I can write to it in one file and print it correctly but it will have still its init value when printed from a different file. It seems like somehow I have two separate .. memory ranges?.. inside the same DLL although all "extern C" functions are callable as supposed to. I do not spawn processes or stuff like that.
Question, how can I go about debugging that? How does visual studio select the CPPs to compile and link to a DLL?
Huge thanks in advance!