comp.lang.ada
 help / color / mirror / Atom feed
* trying to call HDF5 from ada -- problems with constants
@ 2004-08-25 13:38 Christopher Broeg
  2004-08-25 16:35 ` Brian Catlin
  0 siblings, 1 reply; 9+ messages in thread
From: Christopher Broeg @ 2004-08-25 13:38 UTC (permalink / 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 ~)



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-08-27 11:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-25 13:38 trying to call HDF5 from ada -- problems with constants Christopher Broeg
2004-08-25 16:35 ` 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

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