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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,99b1e592ddea1442 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ada library, interfacing ADA with C Date: Wed, 19 Dec 2007 12:42:18 +0000 Organization: Pushface Message-ID: References: NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1198068138 21706 62.49.19.209 (19 Dec 2007 12:42:18 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 19 Dec 2007 12:42:18 +0000 (UTC) Cancel-Lock: sha1:cMLViJfCB+IqjyWysahNCs8AJ7k= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Xref: g2news1.google.com comp.lang.ada:19000 Date: 2007-12-19T12:42:18+00:00 List-Id: david-mamour@hotmail.fr writes: > I read the gnat manual and it is said that i can use gnatmake and a > project library. > So I use gnatmake: > $ gnatmake -Pmy_lib.gpr I think you should use powerpc-eabispe-gnatmake (? note the second -, like the other commands, not powerpc-eabispegnatmake as you have below) instead of plain gnatmake. > I get the following message: > > > powerpc-eabispe-gnatbind -n -o b~lib.adb -Llib prog1.ali prog2.ali > powerpc-eabispe-gcc -c b~lib.adb > > > building static library for project my_lib > powerpc-eabispegnatmake: powerpc-elf-ar not found in path. Very odd since you presumably have powerpc-eabispe-as. Perhaps the bintools build failed for some reason? Can you do a plain build to produce an executable (hello_world.adb or some such)? > In fact I haven't powerpc-elf-ar on my computer, so i created a link > to it with : > ln -s powerpc-eabispe-ar powerpc-elf-ar > But the problem is the same and all my PATH are good. I'm not sure that the path used by x-gnatmake is necessarily the same as that used by ordinary calls, did you put this symlink in the same place as the other powerpc-eabispe- tools? > My project library my_lib.gpr > > > /******** Library project*****/ > project My_Lib is > for Source_Dirs use ("SRC"); > for Object_Dir use "CGN"; > for Library_Name use "lib"; > for Library_Dir use "LIB"; > for Library_Kind use "static"; > end My_lib; > > > Because it didn't work, i tried to create a library with the > following > command: > powerpc-eabispe-ar rc libmy_lib.a prog1.o prog2.o > > > but there is an other problem because gnatlink ask me to supply an > ALI file which has a corresponding bind file so I can't create an > executable. Could you say me how must I use a library file with > gnatlink (which command use) ? The same ones that gnatmake told you it was using, as above! (use gnatmake -v for more info if you weren't already). > powerpc-eabispe-gnatbind -n -o b~lib.adb -Llib prog1.ali prog2.ali > powerpc-eabispe-gcc -c b~lib.adb