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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Can't create executable file. Date: Thu, 6 Mar 2014 09:41:42 +0100 Organization: cbb software GmbH Message-ID: <1j0wgl36am4lg$.ko8uso1ka9l7$.dlg@40tude.net> References: <87d943b8-5907-4d0f-9e80-e3c99402472c@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: I5Na6+WsEzT8WoegI0VZTA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 1510 Xref: number.nntp.dca.giganews.com comp.lang.ada:185142 Date: 2014-03-06T09:41:42+01:00 List-Id: On Thu, 6 Mar 2014 00:35:04 -0800 (PST), oktawian.lagiewski@gmail.com wrote: > When i use gcc - program.adb i get two new files (ali and o). I wanted to create > executable so i typed gnatbind program but i get message: > > "program.adb:1: Program cannot be used as a main program. > Help me please, I'm trying to learn but there is not much info about > command prompt compiling. Below is the code for .adb and .ads : [...] You put program2 into a package (Program). Such program cannot be used as main. Move it outside the package, e.g. into the file program2.adb: procedure Program2 is begin ... end Program2; -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de