cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
if (ed)
{
// make sure it is saved
ed->Save();
file.Assign(ed->GetFilename());
}
// Now activate the project this file belongs to
ProjectFile* pf = ed->GetProjectFile();
Oh, I seemed to do something stupid when building CB. I had set a wrong compiler setting and linked a library that isn't needed, and that error was in that module. After I removed it, CB can start correctly.
stahta01: GCC 13.2.0 from MSYS2,I suggest to try i686 builds from WinLibs or niXman. Also you probably need to care about Mingw-w64 version. I have some fresh experience with WinXP, key issues was to find relatively fresh compiler with XP-compatible Mingw-w64. The same story may be with Win7 32b.
I will try other mingw-w64 versions; I've used winlibs' and nixman's build of version 13 before, they also have the similar problems and, even other problems like -pipe errors. Maybe I should change the compiler's version.I suggest to control Mingw-w64 version as well. Mingw-w64 interact with OS, and may call inappropriate system functions. Typically gcc and Mingw-w64 are from the same generation, but at least at Winlibs sometimes older Mingw-w64 may be coupled with more fresh gcc.