PDA

View Full Version : QVariant compile errors



ntp
14th May 2008, 00:48
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.

ChristianEhrlicher
14th May 2008, 06:48
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)

thomir
14th May 2008, 07:39
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?

ntp
14th May 2008, 19:07
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.