2009-10-10 18:05:01 +00:00
|
|
|
By default, qpdf builds on UNIX and UNIX-like systems with simple
|
|
|
|
./configure; make; make install comamnds. It ordinarily uses libtool
|
|
|
|
to build libraries and link executables.
|
2009-10-10 15:10:05 +00:00
|
|
|
|
2009-10-10 18:05:01 +00:00
|
|
|
As an alternative, the build system can use its own built-in rules.
|
|
|
|
The available build rules can be found in the make directory; all the
|
|
|
|
files except rules.mk are build rules. The gcc-linux rules are there
|
|
|
|
primarily for testing the build system. They are not intended to be
|
|
|
|
used in production since, in a Linux environment, it's better to use
|
|
|
|
the default libtool rules.
|
2009-10-10 15:10:05 +00:00
|
|
|
|
2009-10-10 18:05:01 +00:00
|
|
|
For building on Windows, autoconf and libtool don't generate a working
|
|
|
|
build for either mingw (as of this writing) or MS Visual C++. We use
|
|
|
|
our own rules instead. In addition, the external dependencies (pcre
|
|
|
|
and zlib) are often not present on Windows systems.
|
2009-10-10 15:10:05 +00:00
|
|
|
|
2009-10-10 18:05:01 +00:00
|
|
|
If you have MSYS and Mingw installed, you can run configure as follows:
|
2009-10-10 15:28:33 +00:00
|
|
|
|
2009-10-10 18:05:01 +00:00
|
|
|
./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=mingw
|
2009-10-10 15:28:33 +00:00
|
|
|
|
2009-10-10 18:06:26 +00:00
|
|
|
To build with msvc, you must be running in a shell environment that
|
|
|
|
puts the MSVC tools in your path. Then you can run
|
|
|
|
|
2009-10-11 00:44:23 +00:00
|
|
|
CC=cl CXX="cl /TP /GR" CPPFLAGS=-DHAVE_VSNPRINTF ./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=msvc
|
2009-10-10 18:06:26 +00:00
|
|
|
|
2009-10-11 00:44:23 +00:00
|
|
|
This is tested with MSVC .NET 2008 Express.
|
2009-10-10 18:06:26 +00:00
|
|
|
|
2009-10-10 18:05:01 +00:00
|
|
|
From there, run
|
2009-10-10 17:32:34 +00:00
|
|
|
|
2009-10-10 18:05:01 +00:00
|
|
|
make
|
|
|
|
|
|
|
|
at the top level directory to build everything. Building with mingw
|
|
|
|
from a cygwin environment is not likely to work. However, you have to
|
|
|
|
have a cygwin environment to run the test suite. Once you have built
|
|
|
|
qpdf using mingw, you can test as follows:
|
|
|
|
|
|
|
|
From your MSYS environment:
|
|
|
|
|
|
|
|
* Run objdump qpdf/build/qpdf.exe | grep DLL
|
|
|
|
|
|
|
|
* Copy the gcc runtime DLL into libqpdf/build
|
|
|
|
|
|
|
|
From a Cygwin environment:
|
|
|
|
|
|
|
|
* Add the full path libqpdf/build to your path
|
|
|
|
|
|
|
|
* Run
|
|
|
|
|
|
|
|
make check GENDEPS=0
|
|
|
|
|
|
|
|
This will run the qtest-based test suite, which requires cygwin. You
|
|
|
|
need perl, gnu diffutils, and basic shell commands.
|
|
|
|
|
|
|
|
As of this writing, the image comparison tests confuse ghostscript in
|
|
|
|
cygwin, but there's a chance they might work at some point. If you
|
|
|
|
want to run them, you need ghostscript and tiff utils as well. Then
|
|
|
|
omit --disable-test-compare-images from your configure statement.
|
|
|
|
|
|
|
|
If you are building with MSVC and want to debug a crash in MSVC's
|
|
|
|
debugger, first start an instance of Visual C++. Then run qpdf. When
|
|
|
|
the abort/retry/ignore dialog pops up, first attach the process from
|
|
|
|
within visual C++, and then click Retry in qpdf.
|