[sword-devel] C# Binding Example - success
Jon Behrens
jbb at crimsonthread.com
Tue Sep 2 15:24:54 MST 2014
Praise God - after a week of fooling with this, I have finally gotten
the C# binding example to work. Here's how I did it.
Starting with a clean Linux Mint 17 install (Ubuntu derivative), install
the following software (Thanks Troy for the list)
subversion //Probably only needed if you don't download the tar file
automake
libtool
g++
zlib1g-dev
libicu-dev
libcurl4-openssl-dev
libclucene-dev
monodevelop
mono-complete
Go to http://crosswire.org/sword/develop/index.jsp and download and
extract the files into a directory ~/sword-1.7.3 in this case.
Rename the directory from sword-1-7.3 to sword - this will prevent
getting a library named sword-1.7.3.so. Not necessarily a problem, but
you would have to change the name of the library that the examples are
searching for.
Edit the file usrinst.sh. Near the top of the file is a line:
OPTIONS="--disable-shared $OPTIONS"
Comment that line out - or remove it, I suppose. This will get the make
to generate a shared library in addition to the static one.
Open the INSTALL file in a window so you can refer to it and follow the
instructions.
If the examples in ~/sword/examples/cmdline work, you've got everything
set up properly.
Now edit /etc/environment and add the line:
LD_LIBRARY_PATH="/usr/lib"
Assuming you've not changed the location of libsword.so from the default.
$ source /etc/environment
Now open monodevelop and open the project file in ~/sword/bindings/csharp
There are three projects in the solution. Expand Sword.tests and edit
the References. Remove nunit.core and nunit.framework. In the Assembly
tree, check nunit.core and nunit.framework. For some reason these
packages in the as-shipped solution cause the compile to fail. Removing
and replacing them fixes that problem.
Build the solution and run the LookupExample.
More information about the sword-devel
mailing list