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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a77191f3e4e3079e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!decbec26!not-for-mail From: "Brian Catlin" Newsgroups: comp.lang.ada References: Subject: Re: trying to call HDF5 from ada -- problems with constants Organization: Sannas Consulting X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response Message-ID: Date: Wed, 25 Aug 2004 16:35:36 GMT NNTP-Posting-Host: 68.164.68.215 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1093451736 68.164.68.215 (Wed, 25 Aug 2004 09:35:36 PDT) NNTP-Posting-Date: Wed, 25 Aug 2004 09:35:36 PDT Xref: g2news1.google.com comp.lang.ada:2991 Date: 2004-08-25T16:35:36+00:00 List-Id: "Christopher Broeg" 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 ~)