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: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feeder02.blueworldhosting.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: .h header file in ObjectAda 8.2.2 source code? Date: Sat, 20 Jul 2013 11:07:36 +0300 Organization: Tidorum Ltd Message-ID: References: <54f7f0d4-29ef-4de0-94d8-8320e8df24e2@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net 0K7Jm2GeT7NgKsDz6aI5VA0Aea8VITpjxZ7zCgvm2IDbQiUIdr Cancel-Lock: sha1:UgSW7dQE28mLDmjnulPpxmKCvz4= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 In-Reply-To: X-Original-Bytes: 2344 Xref: number.nntp.dca.giganews.com comp.lang.ada:182607 Date: 2013-07-20T11:07:36+03:00 List-Id: On 13-07-19 18:36 , dd24fan wrote: > Okay, the header file file contains all necessary information > to access type definitions and RTL function prototypes. Oh, "RTL"... Is the C library some kind of "run-time library" for some model-based design tool? If so, does the library involve or implement multi-threading or some other kind of concurrency? That could cause conflicts with the Ada run-time system. > Below is a snippet of the .h file: [ elided ] Looks like a nicely structured C header, which in Ada can be represented by Ada constant, type, and subprogram declarations with pragma Convention and Import. > #include "xyz.h" (this section has 40+ #includes of .h files) Ouch... lots of work, if you need all 40+ headers. The GNU Ada compiler system has a mode where the compiler can translate a C header file into Ada declarations -- perhaps this could help do the bulk work. > I believe it to hang in the first call to the C code. Randy's advice is good. Also, check that you have initialized the library correctly -- typically, the application code has to make some initialization calls, before doing any other calls, and omitting the initialization can cause havoc or hang. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .