ReBuild=Clean followed by Buildhbr_in wrote:Why 3 options provided. Isnt the 2nd & 3rd the same. Isnt 1st & 2nd enough for all purpose. Since i havent seen such a situation, i would like to know where it is or will be used.
It is not really the same, assuming you have a large project, clean can take some time, so u clicked 'Clean' and then you need to *wait* and then do the 'Build'
Rebuild does the waiting for you...
Regarding the problem:
Can u try to run 'Build' (F7 or project context meun -> Build) and not 'Compile' from file context menu.
The problem is:
The 'Change directory' is not respected for single file compilation only - how ever it is respected for project build.
I found this in the code:
Code: Select all
//when using custom build, user can select different working directory
if (isCustom) {
//first set the path to the project working directory
::wxSetWorkingDirectory(proj->GetFileName().GetPath());
BuildConfigPtr buildConf = WorkspaceST::Get()->GetProjBuildConf(m_info.GetProject(), m_info.GetConfiguration());
if (buildConf) {
wxString wd = buildConf->GetCustomBuildWorkingDir();
if (wd.IsEmpty()) {
// use the project path
wd = proj->GetFileName().GetPath();
}else {
// expand macros from path
wd = ExpandAllVariables(wd, WorkspaceST::Get(), proj->GetName(), buildConf->GetName(), wxEmptyString);
}
::wxSetWorkingDirectory(wd);
}
}
Code: Select all
if (m_info.GetProjectOnly() || m_fileName.IsEmpty() == false) {
//need to change directory to project dir
::wxSetWorkingDirectory(proj->GetFileName().GetPath());
..
...
Please open a bug about this: 'Custom build & compile single file does not honors the working directory set'
Eran