News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

wizard 'staticlib' help

Started by LETARTARE, February 03, 2013, 02:43:10 PM

Previous topic - Next topic

LETARTARE

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 ?

CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

LETARTARE

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 ?


CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

LETARTARE

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.
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

Alpha

Could you generate a patch with svn diff please?

LETARTARE

CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

Alpha

Sorry, this got lost.
If I do not say anything in a few days, could you please remind me?

LETARTARE

@ 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
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

Alpha

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.

LETARTARE

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


CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

LETARTARE

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.
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

Alpha

Probably it would be best to leave this wizard alone until someone who uses it explains the purpose.