Qt 4.8.6
Compilazione librerie Qt 4.8.6
Preparazione
- Scaricare e installare
Microsoft Visual Studio 2013. - Scaricare il file
qt-everywhere-opensource-src-4.8.6.7zda fileCamp. - Scaricare il file
build_4_8_6.batda fileCamp.
Corpo del file build_4_8_6.bat
@echo off
set QTDIR = \Qt\4.8.6
set QMAKESPEC = win32-msvc2013
set TERM = dumb
set path = %PATH%;%QTDIR%\bin
cd %QTDIR%
if NOT "%1" == "configure" goto compile
configure -debug-and-release -opensource -platform win32-msvc2013 -openssl -qt-sql-mysql -qt-sql-odbc -qt-sql-psql -no-qt3support -nomake demos -nomake examples
rem -webkit -webkit-debug
goto end
rem -qt-sql-mysql -qt-sql-psql -qt-sql-odbc -qt-sql-sqlite2 -qt-sql-ibase
:compile
nmake
rem ..\jom_1_0_11\jom.exe -j 4
:end
cd ..
Installazione
- Creare la cartella
Qtnella root del disco (esc:\Qt). - Scompattare il file
qt-everywhere-opensource-src-4.8.6.7znella cartellaQt\. - Rinominare la cartella
Qt\qt-everywhere-opensource-src-4.8.6inQt\4.8.6. - Copiare il file
build_4_8_6.batnella cartellaQt\
Configurazione
Aprire il prompt dei comandi di Microsoft Visual Studio 2013 (Developer Command Prompt for VS2013) ed eseguire i comandi:
cd \Qt
build_4_8_6.bat configure
Verrà richiesto di accettare la licenza d'uso:
This is the Qt for Windows Open Source Edition.
You are licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) version 2.1
or the GNU General Public License (GPL) version 3.
Type '3' to view the GNU General Public License version 3 (GPLv3).
Type 'L' to view the Lesser GNU General Public License version 2.1 (LGPLv2.1).
Type 'y' to accept this license offer.
Type 'n' to decline this license offer.
Do you accept the terms of the license?
Digitare Y + Invio per far partire il processo di configurazione, al termine del quale verrà mostrato il messaggio:
Qt is now configured for building. Just run nmake.
To reconfigure, run nmake confclean and configure.
Compilazione
Aprire il prompt dei comandi di Microsoft Visual Studio 2013 (Developer Command Prompt for VS2013) ed eseguire i comandi:
cd \Qt
build_4_8_6.bat
Il processo di compilazione può richiedere diversi minuti
Al termine del processo di compilazione verrà mostrato il messaggio:
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
Variabili d'ambiente di sistema
Aprire la finestra Variabili d'ambiente di Windows e nella sezione delle Variabili di sistema aggiungere le due variabili:
| Variabile | Valore |
|---|---|
QTDIR |
Inserire il path assoluto (es. C:\Qt\4.8.6) |
QMAKESPEC |
win32-msvc2013 |
Infine modificare il valore della variabile PATH aggiungendo il valore %QTDIR%\bin