R
RudeOfTheTurks
Guest
Hello,
I am trying to create a program where I will set an environment variable in the batch file that launches the solution in order for #if (macro) defines to compile certain portions of code. My issue is that the Visual Studio IDE does not seem to pick up on what the macro definition is when I reload the application.
For example, if I define my environment variable to be "0" and compile the chunk inside of the #if/#endif block won't compile. The IDE will still display it as a non-zero number and give the appearance that the preprocessor block is active. I realize I have to recompile anytime I load the IDE with a different environment variable, my issue just comes in with the IDE itself seemingly not picking up on any change I make to the variable. I can modify the batch file, change the number, save it, then restart VS and it will never register.
I'm confused on why that is and if there's anything I have to do to make sure the IDE can picture it properly. If there's nothing that can be done and I just have to be cognizant of the environment variable before I run the batch file for the application that's fine too. Thanks for any help.
Continue reading...
I am trying to create a program where I will set an environment variable in the batch file that launches the solution in order for #if (macro) defines to compile certain portions of code. My issue is that the Visual Studio IDE does not seem to pick up on what the macro definition is when I reload the application.
For example, if I define my environment variable to be "0" and compile the chunk inside of the #if/#endif block won't compile. The IDE will still display it as a non-zero number and give the appearance that the preprocessor block is active. I realize I have to recompile anytime I load the IDE with a different environment variable, my issue just comes in with the IDE itself seemingly not picking up on any change I make to the variable. I can modify the batch file, change the number, save it, then restart VS and it will never register.
I'm confused on why that is and if there's anything I have to do to make sure the IDE can picture it properly. If there's nothing that can be done and I just have to be cognizant of the environment variable before I run the batch file for the application that's fine too. Thanks for any help.
Continue reading...