how to build ============= Main build instructions: http://www.postgresql.org/docs/8.0/static/install-win32.html Note: to create win64.mak I've removed "/machine:I386 " from bin\psql\win32.mak and interfaces\libpq\win32.mak files. windows 32 bit - Postgresql 8.0.3 ---------------------------------- cd /d D:\cvsbin\release builder\postgresql-8.0.3\src call "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd" /2000 /RETAIL set PROGFILES=Program Files IF %PROCESSOR_ARCHITECTURE%~==AMD64~ set PROGFILES=Program Files (x86) IF "%ProgramFiles(x86)%~"=="C:\Program Files (x86)~" set PROGFILES=Program Files (x86) set INCLUDE=%INCLUDE%;d:\cvsdeps\openssl\include;d:\cvsdeps\iconv\include set LIB=%LIB%;d:\cvsdeps\openssl\lib;d:\cvsdeps\iconv\lib set TEMP="D:\cvsbin\release builder\postgresql-8.0.3\TEMP" rd /s /q %TEMP% mkdir %TEMP% nmake /f win32.mak clean nmake /f win32.mak windows 64 bit - Postgresql 8.0.3 ---------------------------------- Note: I didn't have any lock compiling/linking with USE_SSL=1, but I'm waiting to see if CVSNT links to the openssl libraries, or if the link errors are caused by the fact that the openssl build doesn't export anything... cd /d D:\cvsbin\release builder\postgresql-8.0.3\src call "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd" /XP64 /RETAIL set PROGFILES=Program Files IF %PROCESSOR_ARCHITECTURE%~==AMD64~ set PROGFILES=Program Files (x86) IF "%ProgramFiles(x86)%~"=="C:\Program Files (x86)~" set PROGFILES=Program Files (x86) set INCLUDE=%INCLUDE%;d:\cvsdeps\openssl\include;d:\cvsdeps\iconv\include set LIB=%LIB%;d:\cvsdeps\openssl\lib\x64;d:\cvsdeps\iconv\lib\x64 set TEMP="D:\cvsbin\release builder\postgresql-8.0.3\TEMP" rd /s /q %TEMP% mkdir %TEMP% nmake /f win64.mak clean nmake /f win64.mak USE_SSL=1 fixes for errors in 8.0.26 (incomplete) ---------------------------------------- There are three sets of errors: 1. inline errors 2. /machine:I386 3. include unistd.h inline errors: --------------- http://www.postgresql.org/message-id/bf54be870608091431w3a2ea58bw7d78f803b41e8ee0@mail.gmail.com You can see at line 96 in interfaces\libpq\win32.mak file as: "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\libpq.pch" /YX\ Change it to "WIN32" /D "_WINDOWS" /D "inline=__inline" /Fp"$(INTDIR)\libpq.pch" /YX\ This will help get rid of the libpq build problem without needing to remove "inline" from wchar.c file. /machine:I386 -------------- remove "/machine:I386 " from bin\psql\win32.mak and interfaces\libpq\win32.mak files. include unistd.h ----------------- add "OPT=/O2 /MD /D YY_NO_UNISTD_H" to "OPT=/O2 /MD /D" in bin\psql\win32.mak file. windows 32 bit ---------------- cd /d D:\cvsbin\release builder\postgresql-8.0.26\src rem call "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd" /XP32 /RETAIL call "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd" /2000 /RETAIL rem set PATH=%PATH%;D:\cvsdeps\x32\libxml2\bin set PROGFILES=Program Files IF %PROCESSOR_ARCHITECTURE%~==AMD64~ set PROGFILES=Program Files (x86) IF "%ProgramFiles(x86)%~"=="C:\Program Files (x86)~" set PROGFILES=Program Files (x86) rem set PATH=C:\wix;D:\cvsbin;D:\cvsbin\sysfiles;%PATH%;C:\"%PROGFILES%"\winzip;C:\"%PROGFILES%"\PuTTY;C:\"%PROGFILES%"\"HTML Help Workshop";C:\cygwin\bin rem set INCLUDE=C:\%PROGFILES%\Debugging Tools for Windows (x86)\sdk\inc;%INCLUDE%;d:\cvsdeps\openssl\include;d:\cvsdeps\iconv\include;d:\cvsdeps\bonjour\include;d:\cvsdeps\howl\include;d:\cvsdeps\infozip\c-headers;d:\cvsdeps\infozip;d:\cvsdeps\sqlite\include;d:\cvsdeps\u3 sdk\DAPI;d:\cvsdeps\x32\libxml2\include;c:\winddk\5112\inc\ddk;C:\wix\sdk\inc rem set LIB=C:\%PROGFILES%\Debugging Tools for Windows (x86)\sdk\lib\i386;%LIB%;d:\cvsdeps\openssl\lib;d:\cvsdeps\iconv\lib;d:\cvsdeps\bonjour\lib;d:\cvsdeps\howl\lib;d:\cvsdeps\infozip;d:\cvsdeps\sqlite\lib;d:\cvsdeps\u3 sdk\DAPI;d:\cvsdeps\x32\libxml2\lib;c:\WinDDK\5112\lib\wnet\i386;C:\wix\sdk\lib rd /s /q ..\temp mkdir ..\temp set TEMP=D:\cvsbin\release builder\postgresql-8.0.26\TEMP nmake /f win32.mak clean nmake /f win32.mak