hello,
environment :
QuoteVista Business Pack 2, Mingw32 with TDM-GCC 4.7.1
C::B 12.11 release (wxWidgets unicode 2.8.12)
With the help of the wizard
Quote'File->New->Project->Static library'
I create a static library
project 'libOne.cbp':
QuoteProject title = 'libOne'
Compiler = 'GNU GCC compiler 4.7.1'
Create Release configuration = 'One'
Output dir = 'lib\'
Objects output dir = 'obj'
I watch 'Project-> Properties-> Build targets' :
QuoteOutput filename = 'libOne.a'
path Output dir = 'lib\' does not appear !
I waited 'lib\libOne.a'.Generation is correct and the library is in the root of the project :
QuotelibOne.a
Where is the error ?
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
QuoteGetWorkingDir() -> 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
Quotelib\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.
Could you generate a patch with svn diff please?
yes
with CB 12.11 r8628
Sorry, this got lost.
If I do not say anything in a few days, could you please remind me?
@ Aplha
requested as a reminder.
with a new patch for 'staticlib/wizard.script' (check).
I found that other wizards are in the same situation :
Quotefortran/lib/wizard.script
ogre/wizard.script
sys/wizard.script
thank you
Thanks for the reminder. Attached is a slightly different way of fixing the problem. (This works for me, however, I would appreciate if you could check it on your test cases as well.)
I did not patch the OGRE wizard because it is more complicated, and I do not currently have OGRE installed to test with.
thanks
I have not installed OGRE to test.
On my system I tested came with three changes
Quote12.11
and
Quoter8818
This time the paths given are taken into consideration properly
Well done Alpha
To test Ogre, simply create a directory lure:
Quote?\VirtuelOgre\include\ogre.h
ogre.h is empty
and choose the source code ...
I tried but it seems that their execution directory can be written in
Quote?\VirtualOgre\bin\Release
Quote?\ VirtualOgre\bin\Debug
I do not know the wishes of the developer wizard ...
I can not go further.
Probably it would be best to leave this wizard alone until someone who uses it explains the purpose.