TestDisk Source Compilation

First, read notes about your OS:

TestDisk uses an ncurses interface, so ncurses library and development files must be present.

To be able to list files from Ext2/ext3, Reiser and NTFS partitions some additionals libraries can be used:

How to compile TestDisk

To compile TestDisk, run

./configure
make

You may need to specify parameters to configure, see configure --help. Exemple

./configure
--with-reiserfs-lib=/home/kmaster/perso/testdisk-5.2/progsreiserfs-0.3.1-rc8/libreiserfs/.libs/
--with-reiserfs-includes=/home/kmaster/perso/testdisk-5.2/progsreiserfs-0.3.1-rc8/include/
--with-ntfs-lib=/home/kmaster/perso/testdisk-5.2/ntfsprogs-1.8.5/libntfs/.libs/
--with-ntfs-includes=/home/kmaster/perso/testdisk-5.2/ntfsprogs-1.8.5/include/
--with-ext2fs-lib=/home/kmaster/perso/testdisk-5.2/e2fsprogs-1.34/lib
--with-ext2fs-includes=/home/kmaster/perso/testdisk-5.2/e2fsprogs-1.34/lib

Static version

If you need to run the binary on systems that lack one of the previous libraries, create a static binary with

make static

Static compressed binary

If you need a small binary for binary distribution, get the UPX packer at http://upx.sourceforge.net/ and run

make smallstatic

Note that Linux UPX need decompress program file before run, what request some space on /tmp and running executable must be allowed in this directory (mount -o remount,exec /tmp).

Return to TestDisk page