Results 1 to 5 of 5

Thread: qt 3.3.6 + qwt-5.0.2 + WinXP + MSVisualStudio 6.0

  1. #1
    Join Date
    Dec 2007
    Location
    Genève
    Posts
    9
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Question qt 3.3.6 + qwt-5.0.2 + WinXP + MSVisualStudio 6.0

    Hello!

    I'm using qt 3.3.6 (winXP and C++ Visual Studio 6.0) and I'd like to install qwt-5.0.2
    I've read http://qwt.sourceforge.net/qwtinstall.html for my case it says:
    ----------
    B) Win32/MSVC Qt3/Qt4
    =====================
    Please read the qmake documentation how to convert
    your *.pro files into your development environment.

    F.e MSVC with nmake:
    qmake qwt.pro
    nmake
    ----------

    But I've got the following error while doing nmake:
    ---------------------------------
    [...]

    .\qwt_panner.cpp(53) : error C2666: '[]' : 2 overloads have similar conversions
    .\qwt_panner.cpp(374) : error C2374: 'i' : redefinition; multiple initialization

    .\qwt_panner.cpp(368) : see declaration of 'i'

    [...]

    Generating Code...
    NMAKE : fatal error U1077: 'cl' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\VC98\bin\N
    MAKE.EXE"' : return code '0x2'
    Stop.
    ----------------------------------

    Maybe I forgot something..
    can somebody help me out?..

    Thanks a lot!!
    Last edited by Times; 7th December 2007 at 14:34.

  2. #2
    Join Date
    Oct 2007
    Location
    Munich, Bavaria
    Posts
    144
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qt 3.3.6 + qwt-5.0.2 + WinXP + MSVisualStudio 6.0

    Sounds like the MSVC6.0 compiler doesn't like some piece of qwt code.
    You have the latest service pack of MSVC installed?

    Good luck,

    Tom

  3. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qt 3.3.6 + qwt-5.0.2 + WinXP + MSVisualStudio 6.0

    I don't know very much about the capabilities of the different MSVC releases, but both problems are compiler problems and you need to patch the Qwt code to work around them:

    1) qwt_panner.cpp(53)
    Change the cast ( guess to uint ).

    2) qwt_panner.cpp(374)
    Rename i to j.

    Uwe

  4. The following user says thank you to Uwe for this useful post:

    Times (7th December 2007)

  5. #4
    Join Date
    Dec 2007
    Location
    Genève
    Posts
    9
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: qt 3.3.6 + qwt-5.0.2 + WinXP + MSVisualStudio 6.0

    Yep, thanks, I've already solved the first error:

    ---------------------------
    [...]
    QwtArray<QwtPicker *> pickers = activePickers(parentWidget());
    /*CHANGED>*/ {
    for ( int i = 0; i < (int)pickers.size(); i++ )
    pickers[i]->setEnabled(false);
    /*CHANGED>*/ }

    d_data->pixmap = QPixmap::grabWidget(parentWidget(),
    cr.x(), cr.y(), cr.width(), cr.height());

    /*CHANGED>*/ {
    for ( int i = 0; i < (int)pickers.size(); i++ )
    pickers[i]->setEnabled(true);
    /*CHANGED>*/ }

    show();
    }
    [...]
    ---------------------------

    Next, I've changed the cast to uint here:

    ---------------------------
    [...]
    #else
    QObjectList *children = (QObjectList *)w->children();
    if ( children )
    {
    for ( QObjectListIterator it(*children); it.current(); ++it )
    {
    QObject *obj = (QObject *)it.current();
    if ( obj->inherits("QwtPicker") )
    {
    QwtPicker *picker = (QwtPicker *)obj;
    if ( picker->isEnabled() )
    {
    pickers.resize(pickers.size() + 1);
    /*HERE>>>>>*/ pickers[pickers.size() - 1] = (uint)picker;
    }
    }
    }
    }
    #endif

    return pickers;
    }
    [...]
    ---------------------------

    But still the same error

    .\qwt_panner.cpp(53) : error C2666: '[]' : 2 overloads have similar conversions


    I'll look into it tomorrow =)

    Thanks!!
    Bon weekend!

  6. #5
    Join Date
    Dec 2007
    Location
    Genève
    Posts
    9
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Thumbs up Re: qt 3.3.6 + qwt-5.0.2 + WinXP + MSVisualStudio 6.0

    FYI:

    Everything works fine with following modifications I've made:
    =================================
    #else
    QObjectList *children = (QObjectList *)w->children();
    if ( children )
    {
    for ( QObjectListIterator it(*children); it.current(); ++it )
    {
    QObject *obj = (QObject *)it.current();
    if ( obj->inherits("QwtPicker") )
    {
    QwtPicker *picker = (QwtPicker *)obj;
    if ( picker->isEnabled() )
    {
    pickers.resize(pickers.size() + 1);
    pickers[(int)pickers.size() - 1] = picker; //!!!!! HERE
    // pickers[pickers.size() - 1] = picker;
    }
    }
    }
    }
    #endif
    ===============================

    Thanks!

Similar Threads

  1. How to upgrade Qwt 5.0.1 to Qwt 5.0.2
    By luffy27 in forum Qwt
    Replies: 1
    Last Post: 15th July 2007, 20:55

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.