最近需要阅读postgresql的代码,但是只阅读不能调试,于是研究了怎样编译postgresql的代码,写在这里记录一下:
1. 编译环境
操作系统:Windows7
开发工具:Microsoft Visual Studio 9.0(即vs2008)
源码版本:postgresql-9.3.1经试验,后续版本用此方法也可以编译通过
2. 工具准备
Postgresql编译需要一些外部工具,需要下载并安装:
ActiveTcl:http://www.activestate.com/activetcl
Bison :http://www.gnu.org/software/bison/
Flex :http://gnuwin32.sourceforge.net/packages/flex.htm
Perl :http://strawberryperl.com/
Libiconv :http://xmlsoft.org/sources/win32/
Libxml2 :http://xmlsoft.org/sources/win32/
Libxslt :