comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: .h header file in ObjectAda 8.2.2 source code?
Date: Sat, 20 Jul 2013 11:07:36 +0300
Date: 2013-07-20T11:07:36+03:00	[thread overview]
Message-ID: <b4uuq9F9nohU1@mid.individual.net> (raw)
In-Reply-To: <b42127a4-c5dc-4fd0-86cd-dd63f014897b@googlegroups.com>

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
      .      @       .


  parent reply	other threads:[~2013-07-20  8:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19 11:47 .h header file in ObjectAda 8.2.2 source code? dd24fan
2013-07-19 13:02 ` Niklas Holsti
2013-07-19 15:36 ` dd24fan
2013-07-20  5:41   ` Randy Brukardt
2013-07-22 19:06     ` dd24fan
2013-07-22 19:08     ` dd24fan
2013-07-22 20:04       ` Niklas Holsti
2013-07-23 12:05         ` dd24fan
2013-07-22 19:50     ` dd24fan
2013-07-20  8:07   ` Niklas Holsti [this message]
2013-08-01 15:03     ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox