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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9939161a73e5f223 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.24.130 with SMTP id u2mr10792237wif.6.1357157328473; Wed, 02 Jan 2013 12:08:48 -0800 (PST) Path: l12ni279845wiv.1!nntp.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!eu.feeder.erje.net!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.szaf.org!news.gnuher.de!news.enyo.de!.POSTED!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Please help with my lua binding Date: Wed, 02 Jan 2013 21:08:47 +0100 Message-ID: <87txqz8i0g.fsf@mid.deneb.enyo.de> References: <38857635-8ab5-4ff6-b547-f40ac31720a2@googlegroups.com> <87bod79xlf.fsf@mid.deneb.enyo.de> Mime-Version: 1.0 X-Trace: news.enyo.de 1357157327 9754 172.17.135.6 (2 Jan 2013 20:08:47 GMT) X-Complaints-To: news@enyo.de Cancel-Lock: sha1:CjlsTvuAITkBjZiyOEIag0N+64g= Content-Type: text/plain; charset=us-ascii Date: 2013-01-02T21:08:47+01:00 List-Id: > I got this: > test.adb:13:06: expected private type "lua_State" defined at lua_h.ads:161 > test.adb:13:06: found private type "System.Address" > lua_h.ads:161:01: declaration of full view must appear in private part > gnatmake: "test.adb" compilation error Please post more complete sources. You need something like this: with System; package Lua_H is type lua_State is private; function luaL_newState return lua_State; private type lua_State is new System.Address; pragma Import (C, luaL_newState, "luaL_newState"); end; with Lua_H; procedure Test is L : Lua_H.lua_State; begin L := Lua_H.luaL_newState; end Test; (Later, you should probably drop the prefixes and move the luaL functions to a separate package.)