From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,ed91c068be20374c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII X-Received: by 10.224.211.193 with SMTP id gp1mr1363895qab.4.1359387237058; Mon, 28 Jan 2013 07:33:57 -0800 (PST) X-Received: by 10.49.38.194 with SMTP id i2mr2324379qek.30.1359387236994; Mon, 28 Jan 2013 07:33:56 -0800 (PST) Path: k2ni2734qap.0!nntp.google.com!p13no5810060qai.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 28 Jan 2013 07:33:56 -0800 (PST) In-Reply-To: <5d81f181-5b5e-4b70-bcb2-0eba26d78465@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=136.163.203.9; posting-account=l8k8IwoAAADeDydswOzwNzmn10qOk9gt NNTP-Posting-Host: 136.163.203.9 References: <5d81f181-5b5e-4b70-bcb2-0eba26d78465@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <99e4f938-db68-4871-ba2e-e454d2c7c4e2@googlegroups.com> Subject: Re: Problem (and solution) with gnatcoll_db2ada From: ake.ragnar.dahlgren@gmail.com Injection-Date: Mon, 28 Jan 2013 15:33:57 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2013-01-28T07:33:56-08:00 List-Id: On Friday, January 25, 2013 4:23:33 PM UTC+1, mockturtle wrote: > Dear all, maybe this is of some interest to few people, but I think it is= worth documenting it. Recently I began working with AWS and GNATCOLL.SQL. = According to the documentation about the gnatcoll_db2ada tool http://docs.a= dacore.com/gnatcoll-docs/sql.html#the-gnatcoll-db2ada-tool by using the opt= ion '-adacreate' gnatcoll_db2ada creates (in package Database) a procedure = Create_Database that creates the database at runtime. However, when I try t= o compile database.adb I get the following error database.adb:136:15: non-v= isible declaration at gnatcoll-sql-exec.ads:208 The problem is that the pro= cedure Database_Connection called at the end of database.adb is in GNATCOLL= .SQL.Exec, not visible from database.adb. A "with + use" will, of course, c= ure the problem, but, as you can imagine, it gets pretty boring to add "wit= h + use" every time you change your scheme (not often, fortunately, but it = happens during the development...). Since I still have around the sources o= f gnatcoll_db2ada, I searched for the bug and I discovered that it suffices= to add just one line in gnatcoll_db2ada-generate.adb The following is the = result of diff gnatcoll_db2ada-generate.adb gnatcoll_db2ada-generate.adb~ 4= 42,443d441 < Put_Line < (Body_File, "with GNATCOLL.SQL.Exec; use GNATCOLL.S= QL.Exec;"); in case you want to apply the correction yourself. My version i= s quite new, I downloaded the source archive on Jan 18. I hope this can be = useful. Best regards, Riccardo Bernardini Thanks for reporting this issue. I've encountered it too. Best regards, =C5ke Ragnar Dahlgren