comp.lang.ada
 help / color / mirror / Atom feed
From: Christopher Broeg <broeg@astro.uni-jena.de~>
Subject: trying to call HDF5 from ada -- problems with constants
Date: Wed, 25 Aug 2004 15:38:18 +0200
Date: 2004-08-25T13:38:18+00:00	[thread overview]
Message-ID: <cgi4oa$o75$1@fsuj29.rz.uni-jena.de> (raw)

Hi,

I want to use HDF5 data format in my ada code. Since there is no ada 
binding available (tell me if there is!) 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 13:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-25 13:38 Christopher Broeg [this message]
2004-08-25 16:35 ` trying to call HDF5 from ada -- problems with constants Brian Catlin
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