[sword-devel] cbible

Isaac Dunham ibid.ag at gmail.com
Fri Jul 31 12:52:21 MST 2015

While I'm not the one who reported the issue, I had a couple easily-fixed
issues with headers (readline needed FILE, and a missing <iostream>).
Patch attached.
This was on Alpine Linux, sword 1.7.4; Debian Jessie is on 1.7.3, and
I don't know if testing (stretch) is on 1.7.4 yet.

Hope this helps,
Isaac Dunham

On Fri, Jul 31, 2015 at 12:02:49PM -0600, Tim Hawes wrote:
> I am sorry to hear that, Peter. Can you send me the output of your compile?
> Is Debian-Testing using 1.7x of Sword? If so, that would be one reason why
> it does not compile. I thought about writing it for the latest Sword, but
> decided to stick with stock libs on Ubuntu LTS, so it is being developed on
> 1.6. I'll add that tidbit of info in my repo's README.
> On 2015-07-31 02:52, Peter von Kaehne wrote:
> >Hi Tim,
> >
> >It failed to compile on my machine - Debian testing.
> >
> >Peter
> >
> >On Sun, 2015-07-26 at 13:36 -0400, Tim Hawes wrote:
> >>I am thinking I should make some announcement about cbible.
> >>https://github.com/timotheosh/cbible
> >>
> >>This is a persoanl project. I wanted an Emacs mode that uses Sword,
> >>and
> >>diatheke is very limiting.
> >>
> >>I wanted to be able to turn off verse numbers, and just print the
> >>reference for the entire passage selection at the end, rather than
> >>getting full book/chapter/verse at the begining of every verse. I
> >>also
> >>wanted to be able to save commentary notes in the Personal commentary
> >>module. So I set up to write a better diatheke (of sorts).
> >>
> >>I have not written in C++ in well over 10 years now, so this was an
> >>opportunity for me to re-learn the language as well.
> >>
> >>I even wrote some very simple unit tests with the Catch unit test
> >>library (https://github.com/philsquared/Catch), and on every commit
> >>to
> >>master, the project compiles and runs the unit tests on Travis CI
> >>(https://travis-ci.org/timotheosh/cbible).
> >>
> >>If you run the program without arguments, you will start in an
> >>interactive mode, similar to the old KJV bible program that used to
> >>be
> >>on the old UNIX C programs FTP site, and now is part of
> >>Debian. Interactive mode uses the GNU readline library. I want to
> >>implement tab-completion for Scripture references, but have not found
> >>a
> >>good way to do this automatically.
> >>
> >>There is a Kdevelop project file (even though I am writing this
> >>almost
> >>entirely in Emacs).
> >>
> >>The program will kickout the Scripture references (with ranges) you
> >>through at it, and will turn on or off versification, and with any
> >>module you have installed. I have not yet implemented search, but I
> >>will
> >>in the near future. I have the component that writes to the Personal
> >>commentary module working, but I have not yet committed those
> >>changes. I
> >>will commit once I refine the unit tests for that piece (within the
> >>next
> >>day or so, if not later today).
> >>
> >>The program creates a config file for the user on first use, that
> >>right
> >>now, just contains the default module. You can specify any module you
> >>have installed, but uses the KJV by default, until you change it in
> >>the
> >>config file (at ~/.cbibe.cfg).
> >>
> >>I am using boost's program_options library. I was thinking of using
> >>getopts at first, but I like the idea of using a configuration file
> >>as
> >>well, and boost's library handles both commandline options and
> >>configuration file.
> >>
> >>I plan on doing some blogging in org-mode on Emacs in the near
> >>future,
> >>and at some point, I will stop writing any new features for this
> >>software, so I can write the elisp I need to be able to use this
> >>within
> >>Emacs, but I can see potential for this lil' pet project to grow some
> >>new features.
> >>
> >>Yours in Christ,
> >>
> >>Tim Hawes
> >>
> >>--
> >>Sent with my mu4e
> >>
> >>_______________________________________________
> >>sword-devel mailing list: sword-devel at crosswire.org
> >>http://www.crosswire.org/mailman/listinfo/sword-devel
> >>Instructions to unsubscribe/change your settings at above page
> >
> >
> >_______________________________________________
> >sword-devel mailing list: sword-devel at crosswire.org
> >http://www.crosswire.org/mailman/listinfo/sword-devel
> >Instructions to unsubscribe/change your settings at above page
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
>From d5f8a733d21fd5f47e01e85f5a24c8c7a89ed515 Mon Sep 17 00:00:00 2001
From: Isaac Dunham <ibid.ag at gmail.com>
Date: Fri, 31 Jul 2015 08:19:54 -0700
Subject: [PATCH] Fix #includes

* readline needs FILE defined, so put it after system includes
* use of std::cerr requires iostream
 src/Options.hpp | 1 +
 src/cbible.cpp  | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Options.hpp b/src/Options.hpp
index 8b48864..219f62d 100644
--- a/src/Options.hpp
+++ b/src/Options.hpp
@@ -18,6 +18,7 @@
 #ifndef OPTIONS_HPP
 #define OPTIONS_HPP
+#include <iostream>
 #include <vector>
 #include <boost/program_options.hpp>
diff --git a/src/cbible.cpp b/src/cbible.cpp
index 846d3f0..39681a9 100644
--- a/src/cbible.cpp
+++ b/src/cbible.cpp
@@ -15,13 +15,13 @@
-#include <readline/readline.h>
-#include <readline/history.h>
 #include <sys/ioctl.h>
 #include <unistd.h>
 #include <iostream>
 #include <string>
 #include <sstream>
+#include <readline/readline.h>
+#include <readline/history.h>
 #include "SwordFuncs.hpp"
 #include "Options.hpp"

More information about the sword-devel mailing list