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,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news.uni-jena.de!not-for-mail From: Christopher Broeg Newsgroups: comp.lang.ada Subject: trying to call HDF5 from ada -- problems with constants Date: Wed, 25 Aug 2004 15:38:18 +0200 Organization: Friedrich Schiller University Jena, Germany Message-ID: NNTP-Posting-Host: ent.astro.uni-jena.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: fsuj29.rz.uni-jena.de 1093441098 24805 141.35.25.76 (25 Aug 2004 13:38:18 GMT) X-Complaints-To: news@rz.uni-jena.de NNTP-Posting-Date: 25 Aug 2004 13:38:18 GMT User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114 X-Accept-Language: en-us, en Xref: g2news1.google.com comp.lang.ada:2990 Date: 2004-08-25T13:38:18+00:00 List-Id: 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 ~)