Results 1 to 4 of 4

Thread: QVariant compile errors

  1. #1
    Join Date
    Jul 2007
    Location
    California, USA
    Posts
    62
    Thanks
    17
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question QVariant compile errors

    I am using Qt4.4 but this happens in Qt4.3.1 also. We are on Windows XP and using Visual C++ 6.0.

    On my machine, using Qt4.4, I can compile and it works fine. On someone else's machine they compile using the same exact project and workspace files and they installed their source files the same way and get the following error:

    c:\Qt\4.4.0\\include\QtCore/../../src/corelib/kernel/qvariant.h(502) : error C2248: 'v' : cannot access private member declared in class 'QVariantComparisonHelper'
    c:\Qt\4.4.0\\include\QtCore/../../src/corelib/kernel/qvariant.h(497) : see declaration of 'v'
    c:\Qt\4.4.0\\include\QtCore/../../src/corelib/kernel/qvariant.h(502) : error C2248: 'cmp' : cannot access protected member declared in class 'QVariant'
    c:\Qt\4.4.0\\include\QtCore/../../src/corelib/kernel/qvariant.h(386) : see declaration of 'cmp'
    We looked at the line of text and I am reaching that (we put a line of code that would cause an error right before it to make sure) so it's not a case of my not getting to that line.

    I know there are some issues with VC++ 6.0 and 4.4.0 but it works for me and in addition, someone else tried it with 3.1 and that failed as well.

    Has anyone run into a problem like this and solved with some sort of environment change? I feel like it must be something really subtle that we cannot see.

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QVariant compile errors

    Maybe a different ServicePack from msvc6?

    I really suggest you to upgrade to msvc8 (express if you don't want to buy a msvc8 prof)

  3. #3
    Join Date
    May 2008
    Location
    London, UK
    Posts
    8
    Thanked 6 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QVariant compile errors

    I use MSVS 6 with SP 2 (or maybe 3) at work, with Qt 4.3.4, and everything works just fine for me..

    As suggested above, perhaps try installing the service packs for visual studio...

    Otherwise, perhaps double-check that your source distributions are the same... do a diff on the source files that came with Qt.. perhaps one of them is slightly different?

  4. #4
    Join Date
    Jul 2007
    Location
    California, USA
    Posts
    62
    Thanks
    17
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QVariant compile errors

    It was a case that I had installed a sp and the other person hadn't (which I didn't realize). Thanks for all the help.

Similar Threads

  1. Access to PostgreSQL DB on a linux server
    By rmagro in forum Qt Programming
    Replies: 28
    Last Post: 13th March 2008, 09:02
  2. Compile Errors (porting Custom widget from Qt3 to Qt4)
    By degs2k4 in forum Qt Programming
    Replies: 3
    Last Post: 7th February 2008, 22:18
  3. Compile Errors
    By luffy27 in forum Qt Programming
    Replies: 3
    Last Post: 4th November 2006, 05:26
  4. Qt compilation errors
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 31st October 2006, 17:29
  5. Qt Compile Errors?
    By magikalpnoi in forum Qt Programming
    Replies: 4
    Last Post: 14th September 2006, 22:18

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.