Building With Python

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
santosh
Posts: 61
Joined: Tue, 2007-07-31, 09:27
Location: Bangalore (India)

Building With Python

#1 Post by santosh »

Hi All,

I am using dcmtk api's and python functions in my project, while building the project it gives a redefination error, as ssize_t is defined in two files i.e cfwin32.h and pyconfig.h

"error 2371: 'ssize_t' : redefinition; different basic types"

cfwin32.h defines it as follows

/* Define `ssize_t' to `long' if <sys/types.h> does not define. */
#define HAVE_NO_TYPEDEF_SSIZE_T 1
#ifdef HAVE_NO_TYPEDEF_SSIZE_T
//typedef long ssize_t;
#endif

and pyconfig.h defines it as follows

/* Define like size_t, omitting the "unsigned" */
#ifdef MS_WIN64
typedef __int64 ssize_t;
#else
typedef _W64 int ssize_t;
#endif
#define HAVE_SSIZE_T 1

how can i overcome this problem.
Thanks
Santosh S B

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1444
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#2 Post by Marco Eichelberg »

I would suggest that you change the typedef in cfwin32.h to equal that in pyconfig.h. That should not cause problems in DCMTK (where ssize_t is only used as a return type for recv() and send()) and should solve your problem.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest