Solved Qt build failed at declarative examples, looking for workaround
-
Dear people,
I was building Qt 5.3.2 from sources with TDM-GCC-64. This includes gcc 5.1.0 and mingw-w64, on a Windows 7 64bit SP1 computer.
The command I entered was:
configure –opensource –opengl desktop –debug-and-release –static –platform win32-g++
and then: mingw32-makeIt then builds fine for something like 5 hours. But ultimately fails at the example code in the
…\qtdeclarative\examples\quick\demos folder.
It starts with the samegame example and the gcc linker (ld.exe) claims it cannot find the qsqlited library.
I don’t think I need Qt quick after all. I primary would like to build Windows GUI applications in C++ with Qt. So, what would be a good workaround in this case? Would it be possible somehow to reconfigure without Qt quick while keeping everything else that was build fine intact?
I would appreciate your suggestions.
Best regards,
Maarten Verhage -
Hi and welcome to devnet,
You can try to re-run configure with less parameters. However it may have sides effects.
-
Hi SGaist,
I appreciate your time. But my common sense tells me to have little faith in your suggestion.
I'm now trying the same command but added -skip qtdeclarative -skip qtscript.
These modules seems to be deprecated after all. Of course I did wipe the folder clean before rebuilding.
-
Sorry, I realise now that my answer is missing some text.
And in fact you should add two more parameters:
-nomake tests -nomake examples
.This will avoid wasting processor time and disk space. You can always build the examples you need afterwards and since you are not actively developing Qt, you're likely not interested in the tests themselves.
-
@SGaist
Thanks for the quick response just now. having fully build examples for basic Windows GUI code is beneficial to me. So wouldn't the build process be smart enough to avoid building the examples in qtdeclarative because the entire module is skipped? I hope I can have a response soon again. Then I will abort my build and continue with a better one. -
Not building them is really just that: avoid building absolutely all examples. They are still available for your to tinker with as sources.
It's really not a good idea to build them all just for the sake of having a only a handful of them ready to run. Examples from skipped module should not be built at all.
-
Thanks for your suggestions. It did build fine now. I was able to launch qtdesigner and build the release version of the analog clock example. I was very naughty because didn't abort the build to set no tests and no examples. The Qt folder is a huge 85.3 GB, but I don't mind. So as a conclusion a static Qt 5.3.2 build with gcc 5.1.0 on Windows 7 64bit is possible with the following configure command:
configure –opensource –opengl desktop –debug-and-release –static –platform win32-g++ -skip qtdeclarative -skip qtscript
Have a nice day!
-
It's not that huge considering that it is a static build and that you have hundreds of tests and the examples built.