Windows open source download is built without RTTI, useless
-
I'm new to Qt and tried to get started on Windows 7 using the open source distribution. Guess what? These libraries are built without RTTI and so cannot be used with the examples from the Qt book (C++ Gui Programming with Qt 4). Can someone at Trolltech please fix this so that I can use windows?
My solution was to move to a Mac where the libs are built with RTTI and everything works.
Why didn't I just rebuild ? Well I tried that but there were so many failures that I gave up. Pretty basic problems, lime qmake referencing mingw libs without adding them to the library link path. I fixed that one, but further problems piled up and I had to conclude that Qt has bad bugs on Windows.
-
I use Qt for Windows everyday, how come you have problems. Can you elaborate your problem more in order we can help?
-
VCSSala, did you try to build the diagram example from chapter 8?
When I try to build it on windows I get a series of errors, some of them are posted here:
http://www.qtcentre.org/threads/37114-Cannot-build-diagram-example-under-Windows-7-incomplete-QGraphicsItem-ckass?highlight=aheirich -
[quote author="aheirich2" date="1293320634"]I'm new to Qt and tried to get started on Windows 7 using the open source distribution. Guess what? These libraries are built without RTTI and so cannot be used with the examples from the Qt book (C++ Gui Programming with Qt 4). Can someone at Trolltech please fix this so that I can use windows?
My solution was to move to a Mac where the libs are built with RTTI and everything works.
Why didn't I just rebuild ? Well I tried that but there were so many failures that I gave up. Pretty basic problems, lime qmake referencing mingw libs without adding them to the library link path. I fixed that one, but further problems piled up and I had to conclude that Qt has bad bugs on Windows.[/quote]
Did you downloaded Qt Sdk for windows? By any chance is your machine also having Microsoft Visual Studio?? If yes then that might be causing problem, I will suggest you build Qt with MSVS if you have that on that machine?
-
I don't think having Visual Studio and Qt SDK installed on a single machine can cause problems. I have them both installed at work but I face no problems.
aheirich2,
Have you installed the latest version of Qt SDK?
-
[quote author="Milot Shala" date="1293356040"]I don't think having Visual Studio and Qt SDK installed on a single machine can cause problems. I have them both installed at work but I face no problems.
aheirich2,
Have you installed the latest version of Qt SDK?[/quote]
I also have Visual Studio (2008 and 2010) and Qt installed and don't have any problems.
-
[quote author="aheirich2" date="1293320634"]
Why didn't I just rebuild ? Well I tried that but there were so many failures that I gave up. Pretty basic problems, lime qmake referencing mingw libs without adding them to the library link path. I fixed that one, but further problems piled up and I had to conclude that Qt has bad bugs on Windows.[/quote]Windows is a tier1 platform, so you should be able to build your Qt with RTTI enabled. It's definitely strange that the default build hasn't RTTI, btw.
-
[quote author="Milot Shala" date="1293356040"]I don't think having Visual Studio and Qt SDK installed on a single machine can cause problems. I have them both installed at work but I face no problems.
aheirich2,
Have you installed the latest version of Qt SDK?[/quote]
There actually is problems, that comes out when Linux persons like me are trying to use that machine conveniently... One basically needs to exclude MSVC and MinGW environments out from each other if she wants to avoid conflicts, sooner or later.
-
As Qt doen's use RTTI internally (they use Qt Meto Objects for all QObject derived classes) I think, thats the reason the do not build in RTTI by default. And RTTI increases the memory usage a bit (e.g. see "here":http://www.rcs.hu/Articles/RTTI_Part1.htm or "here":http://stackoverflow.com/questions/579887/how-expensive-is-rtti or "here":http://www.velocityreviews.com/forums/t287948-rtti-overhead.html ). It's not very much, but there is.
Perhaps it's a historical issue that it's not enabled, we always build Qt new and use RTTI :-) But we ar running desktop apps on powerfull machines.
-
[quote author="Gerolf" date="1293453275"]As Qt doen's use RTTI internally (they use Qt Meto Objects for all QObject derived classes) I think, thats the reason the do not build in RTTI by default.[/quote]
That's nonsense, since in my projects I might want to use RTTI.
-
I did not say, it does not work, so it's not nonesense. Qt internally uses QMetyObject for all QObject casts, so internally, Qt does normally not use RTTI (which is normally used by dynamic_cast for example). Surely you can use it, but the you should also build Qt with RTTI, if you want to use RTTI with the base Qt classes.
Not all people, / projects want to use RTTI. So why should it be on as default? Are you sure, that more than 50% need RTTI on?
-
The problem IMHO is that the Qt SDK / framework download should be a general-purpose download, thus with RTTI enabled (which doesn't harm users who don't need RTTI; if some user has serious memory constraits, he 1) won't be using windows in the first place 2) will recompile Qt either way to add memory optimization options).
-
Without getting into the RTTI discussion I agree that Qt could provide more versions of the SDK for windows. I can't imagine that this would be a challenge for them.
When I tried to compile my Qt application using Visual Studio I was forced to first build Qt and it took a long time.
-
I would say, that's the difference between open source and commercial version.
The commercial version also exists as pre compiled version for MSVS 2008 etc, the open source only for gcc. And as you can build your version with the features you need, for me that's absolutely ok.
Some people want RTTI, some exception handling. some wchar_t as build intype for MSVS, some not. how many version should they provide?
bq. fcrochik said:
Without getting into the RTTI discussion I agree that Qt could provide more versions of the SDK for windows. I can’t imagine that this would be a challenge for them.Afaik they test all packages before publishing them. SO each build needs tests, so it could talke more time then some people expect.