I just noticed when reopening a finished project, that all the “Release” setting I changed, and thought was saved with the project, is back to default.
Furthermore a custom solution configuration created in “Configuration Manager” also saved with project is gone.
I can reproduce this problem, every time I start VS, edit some setting “Alt-F7”, save the project, close VS, and reopening from Projucer, and all it now back to default.
So my questions is; Is that Projucer that is overwriting my Project Properties, or is it Visual Studio, or am I misunderstanding something in VS and to actually have the settings saved I need to do it differently?
In particular I am changing some C/C++ Optimizations and Runtime Library settings.
Yes, you need to make your changes in the Projucer VS2019 exporter settings. Not all options are available, but most of the time you can use “extra compiler flags” and “extra linker flags” to get what you want.
Projucer reads and writes the .jucer file. Projucer also writes files for Visual Studio (.sln, .vcxproj and .vcxproj.filters) on save, but it never reads these files. This means that any configuration change you do in Visual Studio is invisible to Projucer.
Thus you should do all configuration changes in Projucer, so they are persisted in the .jucer file.
And on the same note, I was investigating how to add a program icon, like the Window OS desktop exe file icon, to my app in Visual Studio, but with this information you now provided me, I would not be surprised if Projucer would overwrite that too.
Preprocessor Definitions are identifiers that you can manipulate in your C++ code with preprocessor directives like #if, #if defined(), #else, #endif, #define, #undef, etc. They are not compiler flags.
I’m sorry for misleading you, I thought that Projucer had a field for per-configuration compiler flags, but it doesn’t…
You could specify “/GS-” in the “Extra Compiler Flags” field of the exporter, but then it would apply to all configurations. Maybe that’s fine for you.