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!news2.google.com!news1.google.com!news.glorb.com!feed.cgocable.net!feed.news.qwest.net!mpls-nntp-04.inet.qwest.net!news.qwest.net!not-for-mail Message-Id: <4767d492$0$501$815e3792@news.qwest.net> From: Robert Jones Subject: Re: Ada library, interfacing ADA with C Newsgroups: comp.lang.ada Date: Tue, 18 Dec 2007 09:06:38 -0500 References: User-Agent: KNode/0.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Organization: Qwest Communications Corporation NNTP-Posting-Host: dc2a5aaf.news.qwest.net X-Trace: DXC=iI3m;YgdiogJ3R?GIcgjfnF85SKJoGf>dIZ`^_2VnFIm9oWXn33mghghBWNoFHbRKh2CRf9CnaR1b X-Complaints-To: news@qwest.net Xref: g2news1.google.com comp.lang.ada:18986 Date: 2007-12-18T09:06:38-05:00 List-Id: david-mamour@hotmail.fr wrote: > Hello everybody !!! > > I have to interface ADA with C and I would like to create an ADA > library. > 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 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. > > > 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. > > > 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) ? > > > I forgot to say you I use Cygwin a Unix emulator. It may be that you are using the wrong toolset, Cygwin runs on MS Windows and Windows runs on x86 hardware. The tools that you are using have powerpc in their name which to me seems to imply they are for powerpc hardware. It's just a thought, I've been wrong before.