[vtkusers] How to build libraries for both 32-bit and 64-bit architectures
Michael Jackson
mike.jackson at bluequartz.net
Sat Sep 27 14:19:38 EDT 2008
You need to pass -arch i386 -arch x86_64 to the compiler. Usually in
the configure step you can add more compile flags. By passing both of
those arguments the compiler will compile a 32/64 bit universal binary
of the library. When something else links to the libpng, the linking
program only cares that linpng has _at least_ the archs that it is
compiling for. Any extras are just ignored.
Follow?
Mike Jackson
On Sep 27, 2008, at 1:13 PM, Elvis Dowson wrote:
> Hi,
> I've just run into a bit of problem with building some
> dependent libraries.
>
> Here is my situation, I have libpng-1.2.31 which is used by
> paraview-3.x.x, vtk-5.x and qt-4.5.x.
>
> For paraview, I need the 32-bit version of libpng.
>
> For qt-4.5.x 64-bit, vtk-5.3.x 64-bit and to use the Cocoa
> framework, I need a 64-bit version of libpng.
>
> I first built paraview with the 32-bit version of libpng, and it ran
> correctly.
>
> Then for my qt-4.5.x and vtk-5.x 64-bit compilation tests, I was
> forced to rebuild and install the 64-bit version of libpng. When i
> ran sudo make install, it copied the 64-bit version of the libraries
> and paraview stopped working.
>
> Could someone please tell me what I should do to manage a libpng
> installation that can support both 32-bit and 64-bit architectures?
>
> When I run ./configure --help I get the following information:
>
> Installation directories:
> --prefix=PREFIX install architecture-independent files in
> PREFIX
> [/usr/local]
> --exec-prefix=EPREFIX install architecture-dependent files in
> EPREFIX
> [PREFIX]
>
> What is the --exec-prefix for ?
>
> Best regards,
>
> Elvis Dowson
More information about the vtkusers
mailing list