Errors compiling pdftotext.cc

485 views Asked by At

I'm trying to compile the following code:

https://github.com/zdanozdan/pdftotext/wiki

But my ubuntu (12.04) is requiring too many dependecies, so I don't know how to achieve sucessfull compilation.

Compilation line:

gcc -o pdftotext pdftotext.cc

The first error is:

pdftotext.cc:9:19: fatal error: aconf.h: No such file or directory compilation terminated.

(sorry for my newbie question:)

1

There are 1 answers

3
Jim Stewart On

To save you a lot of time, you don't need to compile this to get it on Ubuntu. Just install the package:

sudo apt-get install pdftotext

If you do want to compile it:

The best way to get started with a build environment is to install the build-essential package:

sudo apt-get install build-essential

That will get you a compiler, some development libraries, the make tool, and other core dependencies.

If that doesn't get what you need, the aconf.h error above it related to AutoConf:

sudo apt-get install autoconf

You may also need automake, and possibly other library dependencies for pdftotext. You can often determine what's needed based on the compilation errors about "missing library" or "missing header", and use apt-get search to find the appropriate package. Development packages are named like libpdf-dev (just an example).