[Dcmlib] Universal build for Mac OSX 10.5 doesn't work

Mathieu Malaterre mathieu.malaterre at kitware.com
Tue Jun 20 19:23:11 CEST 2006


P Bai wrote:
> Hi there,
> 
> I have a program that uses gdcm lib and I've been
> trying to build a universal binary of it for Mac OSX.
> I selected "universal" as build architecture in cmake
> and also added "-arch ppc -arch i386" flags to
> C/CXX/Linker flags and so on. The gdcm libs compiled
> fine, so did the program. But it does not seem to be
> universal. The one compiled on an Intel Mac doesn't
> work (can not recognize dicom file correctly) on a
> PowerPC Mac (G5), and vice versa. 
> 
> Has anyone done universal compilation before? Can you
> give me a little hint on how to get it to work?
> 
> Thanks so much!

This is in essence the same problem as getting VTK compiled as a 
Universal binary:

http://vtk.org/Bug/bug.php?op=show&bugid=3059

Although technically feasible it will definitely require some tweaks. As 
a temporary solution I would suggest compiling gdcm with -ppc, then in 
another binary directory with -i386 and then combining them.

I believe this is a problem with CMake and you should be able to find 
more helpful solution directly on the CMake Mailing List.

Regards,
Mathieu



More information about the Dcmlib mailing list