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,6c0fedd136c7b307 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "news.broadpark.no" Newsgroups: comp.lang.ada References: <47b765d2$1@news.broadpark.no> <47b92e0f$1@news.post.ch> In-Reply-To: <47b92e0f$1@news.post.ch> Subject: Re: undefined reference to `adainit' Date: Mon, 18 Feb 2008 21:44:24 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18000 NNTP-Posting-Host: 150.80-202-137.nextgentel.com X-Original-NNTP-Posting-Host: 150.80-202-137.nextgentel.com Message-ID: <47b9eddb@news.broadpark.no> X-Trace: news.broadpark.no 1203367387 80.202.137.150 (18 Feb 2008 21:43:07 +0100) Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!nntp.gblx.net!nntp3.phx1!news.broadpark.no!not-for-mail Xref: g2news1.google.com comp.lang.ada:19873 Date: 2008-02-18T21:44:24+01:00 List-Id: "Martin Krischik" wrote in message news:47b92e0f$1@news.post.ch... > news.broadpark.no schrieb: > >> .NET. I made a small project and compiled it as follows: >> >> gnatmake -c api >> gnatbind -n api >> gnatdll -d api.dll api.ali >> >> Does anyone know what to do? The GPS project file look like this: > > And where is the "-P" option which tells gnat make to actually use the > project file? The problem is that the GPS project file dows not work. Thus, no -P. I found the solution to the problem. I added the following to the project file: for Library_Name use "Te"; for Library_Interface use ("api"); Now, I'm getting two default functions: Teinit(); Tefinal(); I guess that's the same as adainit and adafinal. However, it seems that the Ada core is still somewhat uninitialised. If I do the following call: Ada.Text_IO.Put_Line("Error - Incorrect number of arguments"); Some kind of exception is raised and the program stops. If I do as follows: Create(OutputFile, Name =>"C:\temp\dump.txt"); Ada.Text_IO.Set_Output(OutputFile); Ada.Text_IO.Put_Line("Error - Incorrect number of arguments"); everything works fine. Any idea? Eirik