lbajardsilogic@0: lbajardsilogic@42: Building Sound Access using Qt 4.0 or 4.1 lbajardsilogic@0: ============================================= lbajardsilogic@0: lbajardsilogic@42: The Sound Access source code should build fine using Qt versions lbajardsilogic@0: 4.0, 4.1 or 4.2. lbajardsilogic@0: lbajardsilogic@0: However, TrollTech introduced an incompatible change to the handling lbajardsilogic@0: of quoted text in version 4.2 of the qmake utility, that makes it lbajardsilogic@0: impossible for us to provide build scripts that will work with both lbajardsilogic@0: older and newer versions. lbajardsilogic@0: lbajardsilogic@0: The provided scripts are for Qt 4.2. If you try to build using Qt 4.0 lbajardsilogic@0: or 4.1, you will get errors like these: lbajardsilogic@0: lbajardsilogic@0: main/MainWindow.cpp:3737: error: parse error before `:' token lbajardsilogic@0: main/MainWindow.cpp:3737:66: invalid suffix "M" on integer constant lbajardsilogic@0: main/MainWindow.cpp:3761:95: too many decimal points in number lbajardsilogic@0: lbajardsilogic@0: To fix this, you will need to patch the file sv.prf in this directory. lbajardsilogic@0: The easiest way to do that if you have a suitable patch utility to lbajardsilogic@0: hand, is to feed this file (README.Qt41) directly into patch, like this: lbajardsilogic@0: lbajardsilogic@0: patch < README.Qt41 lbajardsilogic@0: lbajardsilogic@0: If that succeeds, it will modify the file "sv.prf" from a Qt 4.2 lbajardsilogic@0: compatible format into one that is compatible with Qt 4.0 and 4.1. lbajardsilogic@0: lbajardsilogic@0: If you want to apply the patch some other way, here it is, in unified lbajardsilogic@0: diff format: lbajardsilogic@0: lbajardsilogic@0: --- sv.prf 2006-11-10 11:08:04.000000000 +0000 lbajardsilogic@0: +++ sv.prf.qt41 2006-11-10 11:08:31.000000000 +0000 lbajardsilogic@0: @@ -83,9 +83,9 @@ lbajardsilogic@0: system(pkg-config --exists $$PKG) { lbajardsilogic@0: VERSION = $$system(pkg-config --modversion $$PKG) lbajardsilogic@0: PACKAGE_SYMBOL = $$system(echo $$PKG | tr '[a-z-]' '[A-Z_]') lbajardsilogic@0: - VERSION_SYMBOL = $$PACKAGE_SYMBOL'_VERSION' lbajardsilogic@0: + VERSION_SYMBOL = $$system(echo $$PKG"_VERSION" | tr '[a-z-]' '[A-Z_]') lbajardsilogic@0: DEFINES += HAVE_$$PACKAGE_SYMBOL lbajardsilogic@0: - QMAKE_CXXFLAGS += -D"'"$$VERSION_SYMBOL='"'$$VERSION'"'"'" lbajardsilogic@0: + QMAKE_CXXFLAGS += -D'$$VERSION_SYMBOL="$$VERSION"' lbajardsilogic@0: QMAKE_CXXFLAGS += $$system(pkg-config --cflags $$PKG) lbajardsilogic@0: LIBS += $$system(pkg-config --libs $$PKG) lbajardsilogic@0: message("Using pkg-config package $$PKG with version $$VERSION") lbajardsilogic@0: @@ -142,7 +142,7 @@ lbajardsilogic@0: contains(SV_UNIT_PACKAGES, sndfile):!contains(DEFINES, HAVE_SNDFILE):error("sndfile library required") lbajardsilogic@0: contains(SV_UNIT_PACKAGES, samplerate):!contains(DEFINES, HAVE_SAMPLERATE):error("libsamplerate required") lbajardsilogic@0: lbajardsilogic@0: -VERSION_CFLAGS += -D"'"SVNREV='"'$$system(svnversion -n .)'"'"'" lbajardsilogic@0: +VERSION_CFLAGS += -D'SVNREV="$$system(svnversion -n .)"' lbajardsilogic@0: lbajardsilogic@0: QMAKE_CXXFLAGS_DEBUG += -DBUILD_DEBUG $$VERSION_CFLAGS lbajardsilogic@0: QMAKE_CXXFLAGS_RELEASE += -DBUILD_RELEASE $$VERSION_CFLAGS