PDA

View Full Version : Qt-4.2.2 qmake won't compile under visual studio 2005 on vista



moowy
12th January 2007, 00:14
Hye

I'm trying to compile commercial version of Qt-4.2.2 under visual studio 2005 on windows vista(32-bit). I have installed service pack1 for visual studio 2005 and vista update for visual studio 2005 (and it works fine). The problem is when I try to configure installation (before running nmake) i get an error from the microsoft compile (when trying to compile qmake). I have already set QMAKESPEC to win32-msvc2005 and the path c:\qt\4.2.2\bin.

Does anyone know how to solve this problem? (qt should be compatible with vista-says trolltech)

jacek
12th January 2007, 00:53
Could you post the exact error message?

Brandybuck
12th January 2007, 03:40
Did you apply the patch to get Qt to build on VS2005-SP1? Microsoft introduced a regression into SP1. Qt wasn't the only product that was affected. I understand that Boost and ACE also got hit.

You can get the patch at:
http://www.trolltech.com/company/newsroom/announcements/press.2006-12-18.5819317947

moowy
12th January 2007, 11:17
I'm sure that this is the problem @Brandybuck. Still I'm having problems applying the patch. It doesn't seem to do the trick for me (I have applied the changes like it says in the link:
386a387,388
> typedef typename QHash<Key, T>::iterator DummyHashIterator;
>
841,842c843,844
< inline typename QHash<Key, T>::iterator replace(const Key &key, const T &value);
< inline typename QHash<Key, T>::iterator insert(const Key &key, const T &value);
---
> inline typename DummyHashIterator replace(const Key &key, const T &value);
> inline typename DummyHashIterator insert(const Key &key, const T &value);

I interpreted this like that:
add typedef typename QHash<Key, T>::iterator DummyHashIterator;
add inline typename DummyHashIterator replace(const Key &key, const T &value);
inline typename DummyHashIterator insert(const Key &key, const T &value);
comment inline typename QHash<Key, T>::iterator replace(const Key &key, const T &value),inline typename QHash<Key, T>::iterator insert(const Key &key, const T &value);

I don't know what all the numbers represent: I only managed to decode the last one: 386a387,388

moowy
12th January 2007, 13:10
I think I have solved the problem with qhash.h but the problem still remains with qmap.h. I applied the patch to qmap.h (like it says in the link) but it doesn't work. Any ideas??

moowy
12th January 2007, 21:13
Could someone who applied this patch post how he did-it (maybe attach qmap.h and qhash.h) I would really appreciate it.

Brandybuck
13th January 2007, 06:59
You've interpreted the patch correctly. Unfortunately Windows doesn't include a standard patch utility, or this could all be applied for you. The numbers are the line numbers affected. The < mark the lines in the old file, and the > mark the lines in the new.

I don't have my Windows system available at the moment, so I can't give you my patched files. You may want to write to support@trolltech.com and ask them for pre-patched files. You're paying for support, you might as well use it.

moowy
13th January 2007, 22:06
I solved it. Thanks for all the help.