wordptr.libwpd – Now a Static Library
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 ./src.
Get the latest.
$ git clone git://github.com/jgshort/wordptr.libwpd.git
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:
lib_LTLIBRARIES = libwpd.la
libwpd_la_SOURCES = wp_common.c wp_pool.c wp_string.c wp_configuration.c wp_daemonizer.c
bin_PROGRAMS = wpdwpd_SOURCES = wpd.c tests/libwpd_tests.c
wpd_LDADD = libwpd.la
… where 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 libtoolize and 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.
$ sudo yum install libtool
$ aclocal$ libtoolize
$ autoreconf -i$ ./configure$ make
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.
Have fun.
Latest Posts
- GeForce GTX 660Ti, NVidia, Nouveau and Updating from CentOS 6.3 to 6.4 (2013/03/10)
- One time, at work… (2013/01/17)
- My Family Doesn’t Care About Security (2013/01/09)
- Programmer Competency Matrix – Education and Experience (2012/12/21)
- Your Code Is The Only Meaningful Project Documentation (2012/12/19)
- I’m Not Arguing With You Over Your Terms of Service (2012/12/18)
- Embracing Change (2012/12/18)
- Finding Quality Developers is No Easy Task (2012/12/14)
- From Avid Gamer to Architect (2012/12/10)
- It’s Bugs All The Way Down (2012/12/07)
- wordptr.libwpd – Expanding Configuration, Changing the Interface (2012/12/07)
- On Tightening Focus (2012/12/06)
- 20 Days With the Google Nexus 10 (2012/12/05)
- wordptr.libwpd – Hooking the Main Loop (2012/12/04)
- I Didn’t Read The Docs – MDADM and Hostname (2012/12/02)
- My Developer Toolbox (2012/12/01)
- wordptr.libwpd – Making it More Library-Like (2012/11/30)
- wordptr.libwpd – Now a Static Library (2012/11/29)
- A Linux Daemon Library – Introducing wordptr.libwpd (2012/11/28)
- CentOS, VMware Workstation, Development and Piece of Mind (2012/11/27)

