我试图使用这个lib连接到SQLite数据库,但是我甚至没有将它与我的简单源代码一起编译,我得到很多编译错误,编译器无法编译,所以我想知道是否有人可以帮我展示我如何在Windows中配置和编译这个项目....
ado-ada项目的链接:https://code.google.com/p/ada-ado/
顺便说一句,还有另一种连接MSSQL或SQLite或MySql数据库的好方法吗?
C:\Users\AlexB\Desktop\testeSqlIte>gnatmake -P default.gpr
gcc -c -g -O2 -I- -gnatA C:\Users\AlexB\Desktop\ada-ado-0.4.0\src\ado-queries-lo
aders.adb
ado-queries-loaders.adb:25:06: "ADO.STATEMENTS (spec)" depends on "ADO.SCHEMAS (
spec)"
ado-queries-loaders.adb:25:06: "ADO.SCHEMAS (spec)" depends on "UTIL (spec)"
ado-queries-loaders.adb:25:06: "ADO.OBJECTS (spec)" depends on "UTIL (spec)"
ado-queries-loaders.adb:25:06: "ADO.DRIVERS.CONNECTIONS (spec)" depends on "ADO.
STATEMENTS (spec)"
ado-queries-loaders.adb:25:06: "ADO.STATEMENTS (spec)" depends on "ADO.OBJECTS (
spec)"
ado-queries-loaders.adb:25:06: "ADO.OBJECTS (spec)" depends on "ADO.SESSIONS (sp
ec)"
ado-queries-loaders.adb:25:06: "ADO.SESSIONS (spec)" depends on "UTIL (spec)"
ado-queries-loaders.adb:25:06: file "util.ads" not found
ado-queries-loaders.adb:25:06: "ADO.QUERIES.LOADERS (body)" depends on "ADO.DRIV
ERS.CONNECTIONS (spec)"
ado-queries-loaders.adb:25:06: "ADO.DRIVERS.CONNECTIONS (spec)" depends on "UTIL
(spec)"
ado-queries-loaders.adb:27:06: file "util.ads" not found
ado-queries-loaders.adb:28:06: file "util.ads" not found
ado-queries-loaders.adb:29:06: file "util.ads" not found
ado-queries-loaders.adb:30:06: file "util.ads" not found
ado-queries-loaders.adb:31:06: file "util.ads" not found
ado-queries-loaders.ads:19:20: "ADO.QUERIES (spec)" depends on "ADO (spec)"
ado-queries-loaders.ads:19:20: "ADO (spec)" depends on "UTIL (spec)"
ado-queries-loaders.ads:19:20: file "util.ads" not found
ado-queries-loaders.ads:19:20: "ADO.QUERIES (spec)" depends on "UTIL (spec)"
ado-queries-loaders.ads:19:20: "ADO.SQL (spec)" depends on "UTIL (spec)"
ado-queries-loaders.ads:19:20: "ADO.PARAMETERS (spec)" depends on "ADO.DRIVERS (
spec)"
ado-queries-loaders.ads:19:20: "ADO.DRIVERS (spec)" depends on "UTIL (spec)"
ado-queries-loaders.ads:19:20: "ADO.QUERIES.LOADERS (body)" depends on "ADO.QUER
IES.LOADERS (spec)"
ado-queries-loaders.ads:19:20: "ADO.QUERIES.LOADERS (spec)" depends on "ADO.QUER
IES (spec)"
ado-queries-loaders.ads:19:20: "ADO.QUERIES (spec)" depends on "ADO.SQL (spec)"
ado-queries-loaders.ads:19:20: "ADO.SQL (spec)" depends on "ADO.PARAMETERS (spec
)"
ado-queries-loaders.ads:19:20: "ADO.PARAMETERS (spec)" depends on "ADO.DRIVERS.D
IALECTS (spec)"
ado-queries-loaders.ads:19:20: "ADO.DRIVERS.DIALECTS (spec)" depends on "UTIL (s
pec)"
gnatmake: "C:\Users\AlexB\Desktop\ada-ado-0.4.0\src\ado-queries-loaders.adb" com
pilation error
答案 0 :(得分:1)
项目的主页(链接到的)说它需要Ada Util Library和Dynamo。您需要安装它们(您的错误列表显示您肯定需要Ada Util,我不知道Dynamo)。
您要求Windows构建帮助:您是否安装了类似Unix的环境(例如Cygwin)?如果是这样,您可以尝试使用提供的configure
然后the ’standard’ Unix way中的make
进行设置,但如果不是,最好的办法是将提供的.gpr.in
文件复制到相应的.gpr
并编辑以使用您的直觉删除%
变量:例如,ado.gpr.in
以
with "config";
with "@UTIL_DIR@util";
project Ado is
Version := "@ADO_VERSION@";
Library_Dir := "@ADO_LIBDIR@";
和@UTIL_DIR@
需要替换为要找到util.gpr
的目录;然后,
gnatmake -p -P ado
您需要为Ada Util提供类似的方法。据我所知,它需要配置,但不需要构建或安装(配置ada-ado时,需要添加--with-ada-util=/dir/where/ada-util/source/is
;库构建对Ada Util 1.7看起来没问题。 0,但我需要1.6.1版本才能进行测试。