2009-10-11 01:21:06 +00:00
|
|
|
Common Setup
|
|
|
|
============
|
2009-10-10 15:10:05 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
To be able to run qpdf's test suite, you must have cygwin installed.
|
|
|
|
This is because qpdf's test suite uses qtest, which requires cygwin
|
|
|
|
perl on Windows. (Hopefully a future version of qtest will work with
|
|
|
|
ActiveState Perl.) You must have at least perl and gnu diffutils
|
|
|
|
installed to run the test suite.
|
2009-10-10 15:10:05 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
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 the configure statements given
|
|
|
|
below.
|
2009-10-10 15:10:05 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
Building with MinGW
|
|
|
|
===================
|
2009-10-10 15:28:33 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
QPDF is known to build and pass its test suite with MSYS-1.0.11 and
|
|
|
|
gcc 4.4.0 with C++ support. You can fully configure and build qpdf in
|
|
|
|
this environment, though cygwin is required to run the test suite.
|
|
|
|
You will most likely not be able to build qpdf with mingw using
|
|
|
|
cygwin, though it's possible that it could be made to work with gcc
|
|
|
|
-mno-cygwin.
|
2009-10-10 15:28:33 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
From your MSYS prompt, run
|
2009-10-10 18:06:26 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=mingw
|
|
|
|
make
|
2009-10-10 18:06:26 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
When done, you should copy the gcc runtime dll into the libqpdf/build
|
|
|
|
directory. You can find the path to it by running
|
2009-10-10 18:06:26 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
objdump -p qpdf/build/qpdf.exe | grep DLL
|
|
|
|
type -P libgcc_s_dw2-1.dll
|
2009-10-10 17:32:34 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
replacing libgcc_s_dw2-1.dll with whatever gcc DLL is shown, if
|
|
|
|
different.
|
2009-10-10 18:05:01 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
From your cygwin prompt, add the absolute path to the libqpdf/build
|
|
|
|
directory to your PATH. Make sure you can run the qpdf command by
|
|
|
|
typing qpdf/build/qpdf and making sure you get a help message rather
|
|
|
|
than an error loading the DLL or no output at all. Run the test suite
|
|
|
|
by typing
|
2009-10-10 18:05:01 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
make check GENDEPS=0
|
2009-10-10 18:05:01 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
from your cygwin prompt. The GENDEPS=0 is necessary to prevent the
|
|
|
|
build system in cygwin from trying to interpret the MSYS/Windows paths
|
|
|
|
embedded in the dependency files. If all goes well, you should get a
|
|
|
|
passing test suite.
|
2009-10-10 18:05:01 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
Building with MSVC .NET 2008 Express
|
|
|
|
====================================
|
2009-10-10 18:05:01 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
These instructions would likely work with newer version of MSVC or
|
|
|
|
with full version of MSVC. They may also work with .NET 2005. They
|
|
|
|
have only been tested with .NET 2008 Express.
|
2009-10-10 18:05:01 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
It's possible that the MSVC build may work from MSYS, but since cygwin
|
|
|
|
is needed to run the test suite, these have only been tested from
|
|
|
|
cygwin.
|
2009-10-10 18:05:01 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
You should first set up your environment to be able to run MSVC from
|
|
|
|
the command line. There is usually a batch file included with MSVC
|
|
|
|
that does this. From that cmd prompt, you can start your cygwin
|
|
|
|
shell.
|
2009-10-10 18:05:01 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
Configure as follows:
|
2009-10-10 18:05:01 +00:00
|
|
|
|
2009-10-11 01:21:06 +00:00
|
|
|
CC=cl CXX="cl /TP /GR" CPPFLAGS=-DHAVE_VSNPRINTF ./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=msvc
|
|
|
|
make
|
2009-10-10 18:05:01 +00:00
|
|
|
|
2009-10-11 01:24:48 +00:00
|
|
|
The -DHAVE_VSNPRINTF is really only required for things that include
|
|
|
|
zutil.h from zlib. You don't have to worry about this when compiling
|
|
|
|
against qpdf with MSVC -- only when building zlib. It's harmless to
|
|
|
|
include with the rest of the qpdf build.
|
|
|
|
|
|
|
|
Once built, add the full path to the libqpdf/build directory to your
|
|
|
|
path and run
|
2009-10-11 01:21:06 +00:00
|
|
|
|
|
|
|
make check
|
|
|
|
|
|
|
|
to run the test suite.
|
2009-10-10 18:05:01 +00:00
|
|
|
|
|
|
|
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.
|
2009-10-11 01:21:06 +00:00
|
|
|
|
|
|
|
A release version of qpdf is built by default. You will probably have
|
|
|
|
to edit msvc.mk to change /MD to /MDd to build a debugging version.
|
|
|
|
It has also been attempted to build qpdf with /MT, but it does not
|
|
|
|
pass its test suite in this configuration. I have not investigated.
|