I am trying to merge a code which was translated from unmanaged to managed VC++.NET with another piece of code which was managed to begin with. Each one of these codes compiles fine. However, when I merge them unexpected errors show up. For instance, in the merged code I have explicitly written:
windir = System::Environment::GetEnvironmentVariable("windir");
However, I receive the following error:
Form1.h(37): error C2039: 'GetEnvironmentVariableA' : is not a member of 'System::Environment'
'GetEnvironmentVariableA' is nowhere to be found in my merged code unless some #include invokes it from somewhere and makes it replace what I actually have in the merged code. What might be the reason for all that?