Wednesday, 19 February 2014

Installing and Building QT5.2.1 with Visual Studio 2010

Pre-requisites

Download and install MSVC Studio 2010 (it's free)
Download and install ActivePerl free

Download


Download the qt source code zip file.  The tar.gz file apparently has different line terminations in the files, and may not work.

Unpack


Unpack in the directory you want the QT installation to end up in - there is no "make install" step.

Configure


Everything I read says that you need to run configure.exe, but it has not been built, so needs building.  This is achieved by creating the .gitignore file, and setting the QTSRC environment variable.

Start an MSVC terminal (which ensures the compiler is set up in the path).

set QTSRC=c:\data\qt512
cd c:\data\qt512

echo > .gitignore

configure -static -release -opensource -confirm-license -opengl desktop -make libs -nomake tests -nomake examples -no-compile-examples -accessibility

Warning: Using static linking will disable the use of plugins.  Make sure you compile ALL needed modules into the library.

Gotchas / Errors

cannot build  / configure.exe does not exist

If you see an error saying that configure.exe does not exist (note the double slashes), make sure you've installed ActivePerl - the configure program is configured to check for visual studio files, but not for perl!  Also, make sure that the QTSRC environment variable has been set, and the .gitignore file has been created.

Generating Makefiles ... Cannot read : Access is denied

Generating Makefiles...
Cannot read <X:/qt/dir>: Access is denied.
Error processing project file <X:\qt\dir>
Qmake failed, return code 3

This looks to be caused by incorrect directory separators .... investigating ....




No comments:

Post a comment