Hi,
if a compiler is added in plugins\compilergcc and the include dirs are set to empty in AutoDetectResult:
AddIncludeDir(wxEmptyString);
AddLibDir(wxEmptyString);
AddResourceIncludeDir(wxEmptyString);
then codeblocks will show empty search dirs for this compiler (in the settings/compiler and debugger) at the first start. Then codeblocks write the configuration file default.conf in APPDATA when closing codeblocks.
If codeblocks is started again, then the default.conf is read and in sdk/compiler.gcc the settings are overwritten in
void Compiler::LoadSettings(const wxString& baseKey)
...
SetIncludeDirs(GetArrayFromString(cfg->Read(tmp + _T("/include_dirs"), m_MasterPath + sep + _T("include"))));
SetResourceIncludeDirs(GetArrayFromString(cfg->Read(tmp + _T("/res_include_dirs"), m_MasterPath + sep + _T("include"))));
SetLibDirs(GetArrayFromString(cfg->Read(tmp + _T("/library_dirs"), m_MasterPath + sep + _T("lib"))));
I think if the entry in default.conf does not exists for the compiler or is empty it should be left empty.
SetIncludeDirs(GetArrayFromString(cfg->Read(tmp + _T("/include_dirs"), wxEmptyString)));
Bye,
Mario
Hi Mario,
Quoteif a compiler is added in plugins\compilergcc and the include dirs are set to empty in AutoDetectResult:
AddIncludeDir(wxEmptyString);
AddLibDir(wxEmptyString);
AddResourceIncludeDir(wxEmptyString);
You should avoid adding empty dirs (this may have to do with the other bug you posted where there was a stray -I in the command line). If you don't want any dirs added then don't add any.
QuoteI think if the entry in default.conf does not exists for the compiler or is empty it should be left empty.
SetIncludeDirs(GetArrayFromString(cfg->Read(tmp + _T("/include_dirs"), wxEmptyString)));
You have a point here. It will be corrected.