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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: hreba Newsgroups: comp.lang.ada Subject: Re: -fdump-ada-spec: "FILE" not declared Date: Tue, 7 Apr 2020 19:19:44 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net IRIYiU+qyp1kt2Q7Vdes3AlidBaPLKB7Pd4GQP+XcHx8xD1S/X Cancel-Lock: sha1:565tC282iEpWi5qLyPG6jt2JH+w= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 In-Reply-To: Content-Language: de-DE Xref: reader01.eternal-september.org comp.lang.ada:58322 Date: 2020-04-07T19:19:44+02:00 List-Id: On 2020-04-07 19:10, hreba wrote: > Hi, > I am trying to generate Ada bindings for the GSL (Gnu Scientific > Library) odeiv2 package (ordinary differential equations). So I do the > following 2 steps: > 1. Go to an empty directory "src" and execute >    g++ -c -fdump-ada-spec -C /usr/include/gsl/gsl_odeiv2.h > 2. Go to an empty directory "obj" and execute >    gcc -c -gnat05 ../src/*.ads > Unfortunately, gsl_odeiv2.h includes stdio.h, and this leads to a series > of errors like > > stdio_h.ads:117:69: "FILE" not declared in >     "x86_64_linux_gnu_bits_types_FILE_h" Excuse me, only part of the message was transmitted. Continuing: "FILE" _is_ declared. stdio.h includes , the complete content of which is --------------------------------------------------------------------- #ifndef __FILE_defined #define __FILE_defined 1 struct _IO_FILE; /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE FILE; #endif ---------------------------------------------------------------------- The definition of _IO_FILE I found in /usr/include/x86_64-linux-gnu/bits/libio.h but when I include this additionally, I get # error "Never include directly; use instead." Any idea? -- Frank Hrebabetzky, Kronach +49 / 9261 / 950 0565