Xojo Conferences

DynaPDF Manual - Page 47

Previous Page 46   Index   Next Page 48

Compiling DynaPDF on Mac OS X
Page 47 of 770
Compiling DynaPDF on Mac OS X
The build process on Mac OS X is very similar to Linux and UNIX operating systems. Since
GCC is already the default compiler on Mac OS X it is very easy to compile DynaPDF on this
operating system. All you need is a properly installed GCC compiler including make. The
XCode package, which is delivered with Mac OS X, contains already the GCC compiler. The
easiest way to install GCC is to install XCode 2.5 or higher because it installs GCC 3.3 as well as
GCC 4.0 and all required build tools.
Once the GCC complier was installed it is already possible to compile DynaPDF in the very
same way as described for Linux or UNIX. However, Apple Computers are available with
different CPU types and each CPU type requires a DynaPDF version that was compiled for the
target CPU.
To make the development easier GCC 4.0 or higher can be used as cross compiler to build
libraries for different CPU types on the same host system as well as Universal libraries which
support multiple targets.
The build system of DynaPDF creates by default static and dynamic Universal binaries for the
CPU targets i386, ppc, and x86_64. Which targets are supported can be checked with the
command file.
file libdynapdf.a
file libdynapdf.dylib
If you don't want to create Universal binaries or if you need another CPU target then open the
file configure.in in a text editor and modify the variable ARCH as needed.
Example (add the target Power PC 64):
ARCH=" -arch i386 -arch ppc -arch x86_64 -arch ppc64"
When finish save the file and execute autoconf. This command rebuilds the configure script.
Finally type ./confrel and press enter. The configure script is now executed to build the make
files and finally the script compiles the library. When finish execute make clean to clean up the
build directory. The finish libraries are stored in the subdirectory /source.

Previous topic: Linker flags, Compiler flags, Optimization Level, Recommended compiler version

Next topic: Interactive Forms, Field Appearance