在windows 10上成功安装了Ada 2012 (使用AdaCore-下载-2016-07-14_0729包)之后,我没有找到如何向Ada添加数据库驱动程序支持。我找到了GNATColl库和下载包,但是我没有找到任何关于如何准备cygwin环境来编译它的说明。我是否需要再次在cygwin内安装带有ada支持、postgres和python的gcc工具链,还是只需要准备窗口中/cygdrive/*位置的路径?
发布于 2016-07-19 21:06:16
在Windows1064位上安装ADA 2012
在安装了base软件包之后,我们得到了IDE环境(GPS)和调试程序(GDB)在Ada中开发所需的全部内容。在windows上,只支持32位安装。Windows可以是64位版本。
http://libre.adacore.com/download/configurations
1.先决条件:
1.1.安装Python2.7 for windows -32位
https://www.python.org/downloads/windows/选择32位窗口版本: windows x86 MSI安装程序添加C:\Python27 27到windows上的路径。
1.2.安装PostgreSQL 32位
Gcc编译的AdaCore和外部库中的蚊帐必须采用相同的格式。32位格式的Postgres库可用:http://www.enterprisedb.com/products-services-training/pgbindownload文件:PostgreSQL9.5.3-1-windows-binaries.zip将postgres解压到构建将获得库的文件夹:h:\Ada\postgresql 953
为了编译客户端应用程序,我们不需要安装整个服务器,只需要适当格式的库。
1.3.安装Cygwin
下载从:https://cygwin.com/install.html采取安装-x86.exe文件,这是32位版本的cygwin。
1.3.1.安装make
如果您忘记在第一次安装运行时安装任何内容,只需再次运行安装程序并添加缺少的包。再次启动安装程序-x86.exe并搜索“使包在”开发中,标记它进行安装,然后继续下一步。软件包将安装在现有安装中。
2.安装Ada
2.1.安装Gpl基Ada软件包
File: gnat-gpl-2016-x86-windows-bin.exe
Install with »Run as administrator« .
Destination folder. H:\Ada\GNAT\20162.2.安装Win32Ada
D:\Install\Ada\AdaCore-Download-2016-07-14_0729\x86-windows\adagpl-2016\win32ada
File: win32ada-gpl-2016-x86-windows-bin.exe
Install with »Run as administrator« .
Destination folder: H:\Ada\GNAT\20162.3.安装GtkAda
D:\Install\Ada\AdaCore-Download-2016-07-14_0729\x86-windows\adagpl-2016\gtkada
File: gtkada-gpl-2016-x86-windows-bin.exe
Install with »Run as administrator« .
Destination folder: H:\Ada\GtkAda 2.4.安装AWS web服务器
D:\Install\Ada\AdaCore-Download-2016-07-14_0729\x86-windows\adagpl-2016\aws\sources
File: aws-gpl-2016-src.tar.gz unzip file to working folder.
Now execute next commands in cygwin environment :
$ make setup build
$ make --prefix=/Ada/GNAT/2016 install
AWS should be installed on GNAT compiler root folder by default.
http://docs.adacore.com/aws-docs/aws/building_aws.html2.5.安装带有postgres接口的库
D:\Install\Ada\AdaCore-Download-2016-07-14_0729\x86-windows\adagpl-2016\gnatcoll\sources\
File gnatcoll-gpl-2016-src.tar.gz unzip file to working folder.
**Now execute next commands in cygwin environment :**
$ ./configure --prefix=/Ada/GNAT/2016 –with-postgresql=H:/ADA/PostgreSQL953/lib 对于postgresql文件夹的路径要非常小心。
--------- Summary for GNAT Components --------------
Shared libraries: yes (default: static)
Gtk+: yes (requires pkg-config and gtkada.gpr)
PostgreSQL: yes -LH:/ADA/PostgreSQL953/lib (see --with-postgresql)
Sqlite: embedded (see --with-sqlite)
Projects: yes
Other components where on "no". 手动编辑文件: gnatcoll_shared.gpr
我不确定这是否真的有必要,但我做了清理。
例如,清除返回字符分隔的行尾的折线:
Python_Version := "27
";改为:
Python_Version := "27";在cygwin中执行make命令
$ make
$ make install在出现错误的情况下,请使用“清除命令”重置构建环境,然后使用“配置”重新启动。
https://stackoverflow.com/questions/38424775
复制相似问题