libext2fs is a library which can access ext2 and ext3 filesystems. It is part of e2fsprogs which is a set of tools for creating, altering and maintaining ext2 and ext3 filesystems.
As part of the redevelopment of explore2fs, it was decided that libext2fs should be used to implement the filesystem support. This would bring stability and maintainability to the read support and allow the return of write support.
Initial attempts were made to build libext2fs under the Cygwin environment which provides a posix build and runtime environment. Linking the cygwin library to a Delphi application caused memory management problems and the attempt was abandoned
While searching for a solution, MinGW/MSYS was discovered. MinGW is a build suite which produces native Win32 binary files. It can be coupled with MSYS which provides a posix build environment. The combination does not provide a posix runtime like cygwin does, so alterations were required but they turned out to be quite minor.
Setting up the build environment
Obtaining the source
Download the library code from the e2fsprogs download page
Building the library
Start MSYS and run the following commands. You may need to adjust the paths as requiredtar -zxvf /c/temp/e2fsprogs-1.41.4.tar.gz cd e2fsprogs CC=gcc ./configure
If configure completes successfully then install the patchpatch -p1 < /c/temp/mingw1414.diff
That should patch three files. If so you are ready to build. The build will produce errors. These are expected but should not impact on the creation of the librarymake cd lib/ext2fs make libext2fs.dll