Compilation and installation of DCMTK
Moderator: Moderator Team
-
SWSWDCM
- Posts: 1
- Joined: Mon, 2022-11-07, 18:31
#1
Post
by SWSWDCM » Tue, 2022-11-08, 13:06
I am using dcmtk 3.6.7 in combination with another library called hdf5. I describe my problem here:
https://stackoverflow.com/q/74337792/8735401.
TLDR: because of
in /include/dcmtk/config/osconfig.h, the following typedef inside hdf5:
fails.
Thus my question: Is it safe to remove the #define and its surrounding preprocessor logic (see below) or how else should I proceed?
Code: Select all
/* Define `ssize_t' to `long' if <sys/types.h> does not define. */
#define HAVE_NO_TYPEDEF_SSIZE_T
#ifdef HAVE_NO_TYPEDEF_SSIZE_T
#define ssize_t long
#endif
-
Michael Onken
- DCMTK Developer
- Posts: 1940
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
-
Contact:
#2
Post
by Michael Onken » Wed, 2022-11-09, 11:17
Hi,
in DCMTK ssize_t is by definition of "long" has least 32 bit while in hdf5 it needs to be at least 64 bit wide (definition "long long"). So my impression is: tha if you only use the typedef from hdf5 I would not see a problem, and there should not be a problem (of course, if you compile on 32 bit platforms, hdf5 might fail then).
Best regards,
Michael
-
Marco Eichelberg
- OFFIS DICOM Team

- Posts: 1372
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
-
Contact:
#3
Post
by Marco Eichelberg » Thu, 2022-11-17, 16:04
I agree. Using an ssize_t typedef with DCMTK that is "too large" is not a problem. DCMTK just expects ssize_t to be available, since on Posix/Linux platforms this is the return type for system functions like read() or write().
Users browsing this forum: No registered users and 1 guest