ada - Ada - 预期方面标识符
问题描述
我最近开始在 GNAT GPS 社区版中使用 gnatcoll、gnatcoll_sql、gnatcoll_postgres 库。
我的 default.gpr 文件看起来像这样..
with "gnatcoll";
with "gnatcoll_postgres";
project Default is
for Source_Dirs use ("src");
for Object_Dir use "obj";
for Main use ("main.adb");
package Compiler is
for Switches ("ada") use ("-gnat12");
end Compiler;
end Default;
我的主文件看起来像这样
with gnatcoll.SQL.Postgres; use gnatcoll.SQL.Postgres;
with gnatcoll.SQL.Exec; use gnatcoll.SQL.Exec;
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
begin
Ada.Text_IO.Put_Line("Test");
end Main;
当我执行时,我收到以下错误消息...
gprbuild -d -P/home/parallels/Documents/Ada Projects/Connect to Database 2/default.gpr -XGNATCOLL_OS=unix -XBUILD=PROD -XXMLADA_BUILD=static -XLIBRARY_TYPE=static -XGNATCOLL_CORE_BUILD=static -XGNATCOLL_BUILD=static /home/parallels/Documents/Ada Projects/Connect to Database 2/src/main.adb
gcc -c -gnat12 main.adb
gnatcoll-sql.ads:747:12: aspect identifier expected
gnatcoll-strings_impl.ads:315:10: aspect identifier expected
gnatcoll-strings_impl.ads:318:52: aspect identifier expected
gnatcoll-strings_impl.ads:393:15: aspect identifier expected
gnatcoll-strings_impl.ads:396:51: aspect identifier expected
gprbuild: *** compilation phase failed
[2020-04-22 09:36:12] process exited with status 4, 6% (1/16), elapsed time: 00.75s
[2020-04-22 10:00:24] Could not locate executable on path: xterm
我怀疑是否尝试更改此代码,因为它位于 gnatcoll 库中。gnatcoll-strings_impl.ads
如果我应该更改&内的代码,请谁能告诉我gnatcoll-sql.ads
或者有其他解决方案吗?
我无法包含下面的gnatcoll-strings_impl.ads
&gnatcoll-sql.ads
文件以供参考,因为它们太大了!这里有一些屏幕截图供参考...
添加于 2020 年 4 月 29 日
Builder results
/home/parallels/gnatcoll-db/sql/gnatcoll-sql_impl.adb
30:14 warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
/home/parallels/gnatcoll-db/sql/gnatcoll-sql_impl.ads
30:14 warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
/home/parallels/opt/GNAT/2019/include/gnatcoll/gnatcoll-atomic.ads
38:29 "-" not declared in "Atomic_Counters"
104:37 "=" not declared in "Atomic_Counters"
97:33 ">" not declared in "Atomic_Counters"
35:52 "Atomic_Unsigned" not declared in "Atomic_Counters"
添加于 2020 年 2 月 5 日
[parallels@localhost ~]$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[parallels@localhost ~]$ sudo yum -y install gcc
[sudo] password for parallels:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.coreix.net
* epel: mirrors.coreix.net
* extras: mirror.netweaver.uk
* updates: www.mirrorservice.org
Package gcc-4.8.5-39.el7.x86_64 already installed and latest version
Nothing to do
[parallels@localhost ~]$
解决方案
推荐阅读
- asp.net-mvc - 使用 JQuery/Ajax 将数组对象传递给 Controller 的正确格式是什么?
- c - printf() 的系统调用替代方案?
- postgresql - Postgres 创建扩展命令 Docker 容器
- wpf - 如何为 WPF 中的滑块制作自定义字符串刻度标签
- c - POSIX 共享内存与 C 中的动态链接库/对象
- java - Dataflow 上的 Apache Beam 不接受用于 BigQuery 查询的 ValueProvider
- python - 该程序不会在 Tkinter Python 中更改文本之间等待
- elasticsearch - 对于 Rust Rocket 框架,是否可以将 GraphQL 连接到弹性搜索?
- apache - 如何将 Github 存储库克隆到运行 apache2 的 Amazon EC2 实例
- sql - 从给定的日期字段将日期转换为仅月份