[Qt-interest] Building Qt w/Phonon using MinGW

Chris Meyer cmeyer1969+qt at gmail.com
Sun Oct 18 02:28:28 CEST 2009


I'm trying to install Qt w/Phonon from the Git repository on Windows
XP using MinGW.

I've installed MinGW 5.1.6 with the g++ and mingw-make options enabled
(gcc 3.4.5).

I've applied the MinGW headers necessary to handle Phonon, as described here:
http://labs.trolltech.com/blogs/2009/07/15/phonon-and-mingw-a-story-about-true-windows-love/

I've installed ActivePerl.

I've installed Git 1.6.4 (from msys-git).

I've also grabbed Qt from Git:

cd C:\Qt
git clone git://gitorious.org/qt/qt.git
cd qt
git branch 4.5 origin/4.5
git checkout 4.5

I've installed Windows SDK 7:
http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en

I've installed DirectX SDK (August 2009):
http://www.microsoft.com/downloads/details.aspx?FamilyID=b66e14b8-8505-4b17-bf80-edb2df5abad4&displaylang=en

I've set up my Command Prompt with the option /V:ON. This enables
delayed expansion, necessary for Windows 7 SDK to configure
environment variables.

I've run the following script in Command Prompt:

set QTDIR=C:\Qt\qt\
set PATH=%PATH%;C:\mingw\bin;C:\Qt\qt\bin
set QMAKESPEC=win32-g++
cd "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin"
call SetEnv.cmd /Debug /x86 /xp
set dxsdk_dir=C:\Program Files\Microsoft DirectX SDK (August 2009)\
call "C:\Program Files\Microsoft DirectX SDK (August
2009)"\utilities\bin\dx_setenv.cmd
cd C:\qt\qt

I've run configure with the following options. Configure succeeds and
says 'phonon enabled':

-debug-and-release
-confirm-license
-plugin-sql-sqlite
-plugin-sql-odbc
-qt-libpng
-qt-libjpeg
-openssl
-opensource
-no-incredibuild-xge

Finally, I try to make:

mingw32-make

Unfortanately, now I get extensive errors that look like they have
something to do with conflicting Windows SDK and Qt headers. Here are
the first few errors:

In file included from c:/Program Files/Microsoft Visual Studio
9.0/VC/Include/excpt.h:22,
                 from c:/Program Files/Microsoft
SDKs/Windows/v7.0/Include/windows.h:151,
                 from
../../include/QtCore/../../src/corelib/global/qt_windows.h:56,
                 from ../../include/QtCore/qt_windows.h:1,
                 from qtmain_win.cpp:41:
c:/Program Files/Microsoft Visual Studio 9.0/VC/Include/crtdefs.h:530:
error: redeclaration of C++ built-in type `short'
c:/Program Files/Microsoft Visual Studio 9.0/VC/Include/crtdefs.h:574:
error: `__int64' does not name a type
c:/Program Files/Microsoft Visual Studio 9.0/VC/Include/crtdefs.h:582:
error: `__time64_t' does not name a type

My build works fine without Windows SDK / DirectX in the environment,
but then I don't get Phonon.

Anyone have any idea what might be the problem? Need more information?
Suggestions?

Has anyone had success building Qt w/Phonon on Windows using MinGW? If
so, what environment/options?



More information about the Qt-interest-old mailing list