Skip to content

Commit aa213a5

Browse files
author
jef
committed
additions to the MSVC section
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7408 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b7a5973 commit aa213a5

File tree

1 file changed

+102
-2
lines changed

1 file changed

+102
-2
lines changed

INSTALL.t2t

+102-2
Original file line numberDiff line numberDiff line change
@@ -1551,8 +1551,64 @@ Unpack the source to
15511551
c:\Qt\4.x.x\
15521552
```
15531553

1554+
=== To include PostgreSQL support in Qt ===
15541555

1556+
If you want to build Qt with PostgreSQL support you need to download
1557+
PostgreSQL, install it and create a library you can later link with Qt.
15551558

1559+
Download from .../binary/v8.2.5/win32/postgresql-8.2.5-1.zip from an
1560+
PostgreSQL.org Mirror and install.
1561+
1562+
PostgreSQL is currently build with MinGW and comes with headers and libraries
1563+
for MinGW. The headers can be used with Visual C++ out of the box, but the library
1564+
is only shipped in DLL and archive (.a) form and therefore cannot be used with
1565+
Visual C++ directly.
1566+
1567+
To create a library copy following sed script to the file mkdef.sed in
1568+
PostgreSQL lib directory:
1569+
1570+
```
1571+
/Dump of file / {
1572+
s/Dump of file \([^ ]*\)$/LIBRARY \1/p
1573+
a\
1574+
EXPORTS
1575+
}
1576+
/[ ]*ordinal hint/,/^[ ]*Summary/ {
1577+
/^[ ]\+[0-9]\+/ {
1578+
s/^[ ]\+[0-9]\+[ ]\+[0-9A-Fa-f]\+[ ]\+[0-9A-Fa-f]\+[ ]\+\([^ =]\+\).*$/ \1/p
1579+
}
1580+
}
1581+
```
1582+
1583+
and process execute in the Visual Studio C++ command line (from Programs menu):
1584+
1585+
cd c:\Program Files\PostgreSQL\8.2\bin
1586+
dumpbin /exports ..\bin\libpq.dll | sed -nf ../lib/mkdef.sed >..\lib\libpq.def
1587+
cd ..\lib
1588+
lib /def:libpq.def /machine:x86
1589+
1590+
You'll need an sed for that to work in your path (e.g. from cygwin or msys).
1591+
1592+
That's almost it. You only need to the include and lib path to INCLUDE and LIB
1593+
in vcvars.bat respectively.
1594+
1595+
1596+
== Compile Qt ==
1597+
1598+
Open the Visual Studio C++ command line and cd to c:\Qt\4.x.x where you
1599+
extracted the source and enter:
1600+
1601+
configure -platform win32-msvc2005
1602+
nmake
1603+
nmake install
1604+
1605+
Add -qt-sql-odbc -qt-sql-psql to the configure line if your want odbc and
1606+
PostgreSQL support build into Qt.
1607+
1608+
1609+
== Configure Visual C++ to use Qt ==
1610+
1611+
After building configure the Visual Studio Express IDE to use Qt:
15561612

15571613
1) open Visual Studio Express IDE
15581614

@@ -1580,7 +1636,25 @@ Source Files:
15801636
$(QTDIR)\src
15811637
```
15821638

1583-
== Environment Variables
1639+
Hint: You can also add
1640+
1641+
```
1642+
QString = t=<d->data, su>, size=<d->size, i>
1643+
```
1644+
1645+
to AutoExp.DAT in C:\Program Files\Microsoft Visual Studio 8\Common7\Packages\Debugger in front of
1646+
1647+
```
1648+
[Visualizer]
1649+
```
1650+
1651+
That way the Debugger will show the contents of QString when you point at or
1652+
watch a variable in the debugger. There are probably much more additions -
1653+
feel free to add some - I just needed QString and took the first hit in google
1654+
I could find.
1655+
1656+
1657+
== Environment Variables ==
15841658

15851659
Right click on 'My computer' then select the 'Advanced' tab. Click environment variables and
15861660
create or augment the following '''System''' variables:
@@ -1606,7 +1680,31 @@ QTDIR c:\Qt\4.3.2
16061680
SVN_SSH "C:\\Program Files\\PuTTY\\plink.exe"
16071681

16081682

1683+
== Install Python ==
16091684

1685+
Download http://python.org/ftp/python/2.5.1/python-2.5.1.msi and install it.
1686+
1687+
== Install SIP ==
1688+
1689+
Download http://www.riverbankcomputing.com/Downloads/sip4/sip-4.7.1.zip and extract it somewhere.
1690+
From a Visual C++ command line cd to the directory where you extract SIP and run:
1691+
1692+
```
1693+
c:\Program Files\python25\python configure.sh -p win32-msvc2005
1694+
nmake
1695+
nmake install
1696+
```
1697+
1698+
== Install PyQt4 ==
1699+
1700+
Download http://www.riverbankcomputing.com/Downloads/PyQt4/GPL/PyQt-win-gpl-4.3.1.zip and extract it somewhere.
1701+
From a Visual C++ command line cd to the directory where you extracted PyQt4 and run:
1702+
1703+
```
1704+
c:\Program Files\python25\python configure.sh -p win32-msvc2005
1705+
nmake
1706+
nmake install
1707+
````
16101708

16111709
== Install CMake ==
16121710

@@ -1633,7 +1731,7 @@ http://subversion.tigris.org/downloads/1.4.5-win32/apache-2.2/svn-win32-1.4.5.zi
16331731

16341732
= Authors and Acknowledgments =
16351733

1636-
The follwing people have contributed to this document:
1734+
The following people have contributed to this document:
16371735

16381736
- Windows MINGW Section
16391737
- Tim Sutton, Godofredo Contreras 2006
@@ -1643,6 +1741,8 @@ The follwing people have contributed to this document:
16431741

16441742
- Windows MSVC Section
16451743
- David Willis 2007
1744+
- MSVC install additions Tim Sutton 2007
1745+
- PostgreSQL, Qt compile, SIP, Python, AutoExp additions Juergen Fischer 2007
16461746

16471747
- OSX Section
16481748
- Tim Sutton, 2007

0 commit comments

Comments
 (0)