User forums > Help
Compiler Flags not saved (only after restart)
Alpha:
Apologies for losing track of this. Please test the following patch:
--- Code: ---diff --git a/src/plugins/compilergcc/compileroptionsdlg.cpp b/src/plugins/compilergcc/compileroptionsdlg.cpp
index 611fd9f..4160228 100644
--- a/src/plugins/compilergcc/compileroptionsdlg.cpp
+++ b/src/plugins/compilergcc/compileroptionsdlg.cpp
@@ -1371,6 +1371,9 @@ void CompilerOptionsDlg::DoSaveCompilerDefinition()
if (!wxDirExists(ConfigManager::GetFolder(sdDataUser) + wxT("/compilers")))
wxMkdir(ConfigManager::GetFolder(sdDataUser) + wxT("/compilers"));
doc.Save(ConfigManager::GetFolder(sdDataUser) + wxT("/compilers/options_") + compiler->GetID() + wxT(".xml"));
+
+ // update the in memory cache
+ compiler->SetOptions(m_Options);
} // DoSaveCompilerDefinition
// events
--- End code ---
Edit: Looks like it may not be that simple. (Possible issues with overwriting global enable compiler options.)
Edit 2: Or maybe not? Needs more testing...
Jan van den Borst:
This patch works for me!!
oBFusCATed:
Push Alpha, push... :P
Alpha:
Committed r9845. Hopefully no unforeseen side effects...
White-Tiger:
Just sayin... I've already fixed that here: http://forums.codeblocks.org/index.php/topic,19008.msg130050.html
And my change works without a problem ;)
Main difference is that I've removed the old "try" to set options (well, it had a note already because you knew it was wrong xD) and my newly added SetOptions was called in DoSaveCompilerDefinitionand not in DoSaveVars
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version