Compiling DCMTK on Mac OSX 10.4.9

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
jsolomon
Posts: 8
Joined: Wed, 2007-01-17, 10:02

Compiling DCMTK on Mac OSX 10.4.9

#1 Post by jsolomon »

Hello All,
I receive the following error when compiling DCMTK (make all) on a MAC Power PC running OS X 10.4.9:

../include/dcmtk/ofstd/offile.h:70: error: 'fpos64_t' does not name a type
etc.

Any ideas on how to get around this?

Thank you for your consideration,

Jeff

Michael Onken
DCMTK Developer
Posts: 2051
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

Hi Jeff,

I saw this error on my iBook with a current DCMTK CVS version, too. I tested 3.5.4 on an older version of tiger and that worked. So if you report the same error with the 3.5.4 release version I think with Tiger 10.4.9 something changed in Mac OS X that prevents DCMTK from compiling (Maybe new gcc version?). I will take a look at this at home the next days and will hopefully find a solution.

Regards,
Michael

jsolomon
Posts: 8
Joined: Wed, 2007-01-17, 10:02

Compiling DCMTK on Mac OSX 10.4.9

#3 Post by jsolomon »

Hello Michael,
Just to follow up: Have you had any success on comping DCMTK on Mac OSX 10.4.9? I am specifically interested in storescp.

Thank you,
Jeff Solomon

Michael Onken
DCMTK Developer
Posts: 2051
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#4 Post by Michael Onken »

Hi Jeff,

sorry, I just forgot that... I will try this weekend ;)

Regards,
Michael

Michael Onken
DCMTK Developer
Posts: 2051
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#5 Post by Michael Onken »

Hi Jeff,

At the weekend I've checked the compiling issues for Mac OS X. I noticed that you are using the cvs version of dcmtk, correct? We are only doing cross platform testing when preparing a release, thats why the new OFFile class was not compiled before on OS X.

The problem is that in offile.h some "#defines" are specified to check for explicit or implicit "large file support". Mac OS X defines the Macro _LARGEFILE64_SOURCE, but - different to other operating systems - does not need to use dedicated 64-bit function calls for file operations. Therefore Mac OS X has to be excluded from the list of the operating systems requiring explicit 64 bit file access.

Do the following:

Before the the first _WIN32 #ifdef directive

Code: Select all

#ifdef _WIN32
insert

Code: Select all

#ifdef _LARGEFILE64_SOURCE
  #ifndef __APPLE_CC__
    #define EXPLICIT_LFS_64
  #endif
#endif 
and in the following code (including the #ifdef directives directly following these lines) replace every occurence of LARGEFILE64_SOURCE with EXPLICIT_LFS_64.

That worked for me. It lets the compiler use the standard file functions like fopen, fseek etc. instead of fseeko64, .... Maybe this approach changes for the next release but should work as a first solution.

Regards,
Michael

jsolomon
Posts: 8
Joined: Wed, 2007-01-17, 10:02

Mac Compilation

#6 Post by jsolomon »

Thank you Michael,
Using your suggestion, I was able to compile all of the DCMTK programs!

Jeff

Michael Onken
DCMTK Developer
Posts: 2051
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#7 Post by Michael Onken »

:)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest