hello,
the error was in the file 'staticlib/wizard.script'.
in function :
function SetupTarget(target, is_debug)
{
if (IsNull(target))
return false;
target.SetTargetType(ttStaticLib);
if (target.GetWorkingDir().Matches(_T("")))
target.SetOutputFilename(target.SuggestOutputFilename());
else
target.SetOutputFilename(target.GetWorkingDir() + wxFILE_SEP_PATH + target.SuggestOutputFilename());
if (is_debug)
{
// enable debugging symbols for this target
// DebugSymbolsOn(target, Wizard.GetTargetCompilerID()); // TODO: doesn't seem to work?
DebugSymbolsOn(target, Wizard.GetCompilerID());
}
else
{
// enable optimizations for this target
// OptimizationsOn(target, Wizard.GetTargetCompilerID()); // TODO: doesn't seem to work?
OptimizationsOn(target, Wizard.GetCompilerID());
}
return true;
}
the function
GetWorkingDir() -> wxString CompileTargetBase::GetWorkingDir()
always returns _T("") for a target 'ttstaticlib'
So it is always
target.SetOutputFilename (target.SuggestOutputFilename ());
which is executed.
I propose
local outputdir = _T("")
if ( target.GetTitle().Matches(Wizard.GetDebugName()) )
outputdir = Wizard.GetDebugOutputDir()
if ( target.GetTitle().Matches(Wizard.GetReleaseName()) )
outputdir = Wizard.GetReleaseOutputDir()
if (target.GetWorkingDir().Matches(_T(""))) /// ALWAYS !!
target.SetOutputFilename( outputdir + target.SuggestOutputFilename());
With this fix, generation is correctly positioned
lib\libOne.a
Could you check this proposal ?
If you add a target (static library) in a project include the same problem
Also must add more: local outputdir = _T("")
if ( target.GetTitle().Matches(Wizard.GetDebugName()) )
outputdir = Wizard.GetDebugOutputDir()
else
if ( target.GetTitle().Matches(Wizard.GetReleaseName()) )
outputdir = Wizard.GetReleaseOutputDir()
else
outputdir = Wizard.GetTargetOutputDir()
which take into account the directory 'Output dir'
Cordially.