tl;dr wordptr.libwpd can now be linked as a static library.
I spent a few cycles this morning updating
wordptr.libwpd to be an actual static library, not an executable. The static library
libwpd.la gets built under
Get the latest.
First, I changed the configuration for autotools. I had to update
./src/Makefile.am to build a library rather than a bin, something like this:
1 2 3 4 5
lib_LTLIBRARIES indicates the output library and
libwpd_la_SOURCES indicates the files used to build
libwpd.la. I kept an executable around to demonstrate the interface, which I renamed wpd.
Finally, I had to execute
autoreconf -i once I made the appropriate changes to the various configuration files. Here’s a rough sketch of the steps I had to take to create the updated library build. I didn’t have libtool, so I had to
yum install it, first.
1 2 3 4 5 6
You should now be able to
./configure && make from the wordptr.libwpd folder, link against the libwpd.la static library and daemonize away. There’s yet a lot of work to do to really create a robust library from the sample Linux daemon code from which wordptr.libwpd descends, but the library works, the daemonizer works and it’s (somewhat) pretty clean.