First, this "CODEBLOCKS" is defined here:
void MacrosManager::ClearProjectKeys()
{
m_Macros.clear();
m_Macros[_T("AMP")] = _T("&");
m_Macros[_T("CODEBLOCKS")] = m_AppPath;
m_Macros[_T("APP_PATH")] = m_AppPath;
m_Macros[_T("APP-PATH")] = m_AppPath;
m_Macros[_T("APPPATH")] = m_AppPath;
m_Macros[_T("DATA_PATH")] = m_DataPath;
m_Macros[_T("DATA-PATH")] = m_DataPath;
m_Macros[_T("DATAPATH")] = m_DataPath;
m_Macros[_T("PLUGINS")] = m_Plugins;
m_Macros[_T("LANGUAGE")] = wxLocale::GetLanguageName(wxLocale::GetSystemLanguage());
m_Macros[_T("ENCODING")] = wxLocale::GetSystemEncodingName();
But in my build environment, it can't be used.
Here is my situations:
1, I use a C::B(let's say it is the host C::B) to open and build C::B workspace. The build result is the client C::B.
2, The host C::B is usually download from my github action release which is using the latest release version of wx 3.3.1 and latest msys2, and the C runtime is UCRT.
3, The client C::B is usually link to the debug version of the wxWidgets. In my local PC, I have build debug version of wx 3.3.1 myself under gcc compiler(msys2, but the C runtime is MSVCRT, because some of my clients are still using Windows 7) to track errors.
If using $(CODEBLOCKS) method, I have to link the client C::B's plugin against the host C::B, that is not possible. Because they use different wxWidgets library, different GCC version, different C runtime library.