comp.lang.ada
 help / color / mirror / Atom feed
From: "Brian Catlin" <BrianC@sannas.org.bad>
Subject: Re: trying to call HDF5 from ada -- problems with constants
Date: Wed, 25 Aug 2004 16:35:36 GMT
Date: 2004-08-25T16:35:36+00:00	[thread overview]
Message-ID: <sd3Xc.245$W_5.132@newsread1.news.pas.earthlink.net> (raw)
In-Reply-To: cgi4oa$o75$1@fsuj29.rz.uni-jena.de

"Christopher Broeg" <broeg@astro.uni-jena.de~> wrote in message 
news:cgi4oa$o75$1@fsuj29.rz.uni-jena.de...
> Hi,
>
> I want to use HDF5 data format in my ada code. Since there is no ada binding 
> available (tell me if there is!)

A simple Google search reveals:

"Ada 95 bindings for the NCSA hierarchical data format"
http://portal.acm.org/citation.cfm?id=507581&jmp=references&coll=GUIDE&dl=ACM

I would contact the author (who works at Langley)

 -Brian


> I was just starting to do the c calls manually. Everything was fine until I 
> needed the datatype constants, i.e. for H5Dcreate the type_id. The values of 
> the constants is not visible in the corr. .h files in the example above:
>
> H5Tpublic.h:
> ----------------------
> #define H5T_STD_I32BE         (H5OPEN H5T_STD_I32BE_g)
> H5_DLLVAR hid_t H5T_STD_I32BE_g;
> ----------------------
> and in H5api_adpt.h:
> ----------------------
> #if defined(_HDF5DLL_)
> #pragma warning(disable: 4273) /* Disable the dll linkage warnings */
> #define H5_DLL __declspec(dllexport)
> #define H5_DLLVAR __declspec(dllexport)
> #elif defined(_HDF5USEDLL_)
> #define H5_DLL __declspec(dllimport)
> #define H5_DLLVAR __declspec(dllimport)
> #else
> #define H5_DLL
> #define H5_DLLVAR extern
> #endif /* _HDF5DLL_ */
> ----------------------
>
> The only idea I could come up with was writing one c function for each 
> constant and then linking to that c-library.
> Is there no easier way? Besides, I'm not very good at c so I don't know how to 
> compile libs in c.
>
> I'd appreciate some help.
>
> many thanks,
>
> Chris.
>
> ---
> Chrisopher Broeg
> broeg~@astro.uni-jena.de (remove the ~) 





  reply	other threads:[~2004-08-25 16:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-25 13:38 trying to call HDF5 from ada -- problems with constants Christopher Broeg
2004-08-25 16:35 ` Brian Catlin [this message]
2004-08-26  8:04   ` Christopher Broeg
2004-08-26 11:00     ` Jeff C,
2004-08-26 11:46       ` Christopher Broeg
2004-08-26 18:29         ` Ludovic Brenta
2004-08-26 19:20         ` Randy Brukardt
2004-08-27  0:54           ` Jeffrey Carter
2004-08-27 11:32             ` Christopher Broeg
replies disabled

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