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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: cocor_ada: Sets, FileIO? Date: Wed, 10 Aug 2016 17:58:17 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="809230ccffd7ccb97232ccf9bda16930"; logging-data="1562"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/gXDGZssE4D2NjAb6WGjv9wIRyCanbOqM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:71J76X3ggUoq8CeoszfcObdlF7s= sha1:WF8wtl5LjPzlWGnnqpeOjAQI1fc= Xref: news.eternal-september.org comp.lang.ada:31363 Date: 2016-08-10T17:58:17+01:00 List-Id: hreba writes: > I am stuck > at the last step: > >> gcc cr.o -o acr > > I get a large number of "undefined reference errors", starting with > > /usr/lib/x86_64-linux-gnu/crt1.o: In function `_start': > (.text+0x20): undefined reference to `main' > cr.o: In function `_ada_cr': The problem is that gprbuild (which Pascal was using) can be very misleading about the command lines it actually issues. So when Pascal said $ gprbuild -P acr.gpr -aP /usr/local/xnadalib-2016/share/gpr gcc -c fileio.adb fileio.adb:529:16: warning: index for "ext" may assume lower bound of 1 fileio.adb:529:16: warning: suggested replacement: "ext'First" fileio.adb:529:42: warning: index for "ext" may assume lower bound of 1 fileio.adb:529:42: warning: suggested replacement: "ext'First" gcc -c sets.adb gprbind cr.bexch gnatbind cr.ali gcc -c b__cr.adb gcc cr.o -o acr all those lines are just a hint of what was actually going on; you need to call gprbuild to manage the process.