If i open a project, it gives me the right path.. if i close the project and immediately open another one.. it still gives me the path of the old project.. but if i close the project.. try to get the path its blank (like it should be) and then open a project it gives me the right path of the new project
This is a "normal" behaviour from
MacrosManager's point of view. And although it is obviously wrong, there is little one can do about it right now.
The problem lies in a deficiency of
ProjectManager paired with a bad use of build targets (which, unluckily, Code::Blocks encourages you to do, too).
wxString exeFileName = UnixFilename(Manager::Get()->GetProjectManager()->GetActiveProject()->GetBasePath());
That's the correct way to do what you wanted.