Ah, excellent - using &nbsp;&nbsp; g++ `pkg-config --cflags sword` ciphercng.cpp `pkg-config --libs sword`&nbsp;&nbsp;&nbsp; solved it.<br><br>Changing the file /usr/lib/pkgconfig/sword.pc as noted at <a href="https://launchpad.net/edgy-backports/+bug/65451">
https://launchpad.net/edgy-backports/+bug/65451</a> was also necessary.<br><br><div><span class="gmail_quote">On 2/10/07, <b class="gmail_sendername">Troy A. Griffitts</b> &lt;<a href="mailto:scribe@crosswire.org">scribe@crosswire.org
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Chad,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The error:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;swmgr.h: No such file or directory
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tells me that you have not installed sword to your include path:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I/usr/include:/usr/include/sword<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Actually, I&#39;m not sure that syntax is legal.&nbsp;&nbsp;Try:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I/usr/include -I/usr/include/sword
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Or better yet, try:<br><br>g++ `pkg-config --cflags sword` ciphercng.cpp `pkg-config --libs sword`<br><br>I&#39;ve just updated the examples/classes directory in svn to work with the<br>latest sword code and for the Makefile to use this build syntax, which
<br>should allow building outside the sword build system.&nbsp;&nbsp;My apologies for<br>these not being up to date.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Troy.<br><br><br>Chad Johnson wrote:<br>&gt; I&#39;m trying to compile the following program and I get the corresponding
<br>&gt; output. I tried adding&nbsp;&nbsp; using namespace sword;&nbsp;&nbsp; but that did not help.<br>&gt; I was able to compile the examples using the makefile generated from<br>&gt; ./autogen.sh and /usrinst.sh, but what must I do to get this program to
<br>&gt; work? What must my makefile look like? Can I use bakefile? I&#39;d really<br>&gt; like it working soon as I am integrating the SWORD modules with Aletheia<br>&gt; ( <a href="http://aletheia.sourceforge.net">aletheia.sourceforge.net
</a> &lt;<a href="http://aletheia.sourceforge.net">http://aletheia.sourceforge.net</a>&gt;).<br>&gt;<br>&gt; chad@chadjohnson:/tmp/sword/examples/cmdline$ g++ -L/usr/lib<br>&gt; -I/usr/include:/usr/include/sword ciphercng.cpp
<br>&gt; ciphercng.cpp:10:19: error: swmgr.h: No such file or directory<br>&gt; ciphercng.cpp: In function &#39;int main(int, char**)&#39;:<br>&gt; ciphercng.cpp:22: error: &#39;sword&#39; has not been declared<br>&gt; ciphercng.cpp
:22: error: expected `;&#39; before &#39;manager&#39;<br>&gt; ciphercng.cpp :23: error: &#39;ModMap&#39; has not been declared<br>&gt; ciphercng.cpp:23: error: expected `;&#39; before &#39;it&#39;<br>&gt; ciphercng.cpp:24: error: &#39;it&#39; was not declared in this scope
<br>&gt; ciphercng.cpp:24: error: &#39;manager&#39; was not declared in this scope<br>&gt; ciphercng.cpp:31: error: &#39;SWModule&#39; was not declared in this scope<br>&gt; ciphercng.cpp:31: error: &#39;module&#39; was not declared in this scope
<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; /******************************************************************************<br>&gt;<br>&gt;&nbsp;&nbsp;*<br>&gt;&nbsp;&nbsp;* This example demonstrates how to change the cipher key of a module<br>
&gt;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;The change is only in effect for this run.&nbsp;&nbsp;This DOES NOT change the<br>&gt;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;cipherkey in the module&#39;s .conf file.<br>&gt;&nbsp;&nbsp;*<br>&gt;&nbsp;&nbsp;*/<br>&gt;<br>&gt; #include &lt;stdio.h&gt;<br>&gt; #include &lt;
swmgr.h&gt;<br>&gt; #include &lt;iostream&gt;<br>&gt;<br>&gt; using namespace std;<br>&gt;<br>&gt; int main(int argc, char **argv) {<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; if (argc != 2) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fprintf(stderr, &quot;usage: %s &lt;modName&gt;\n&quot;, *argv);
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit(-1);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; sword::SWMgr manager;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// create a default manager that looks<br>&gt; in the current directory for mods.conf<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ModMap::iterator it;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; it = 
manager.Modules.find(argv[1]);<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; if (it == manager.Modules.end()) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fprintf(stderr, &quot;%s: couldn&#39;t find module: %s\n&quot;, *argv, argv[1]);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit(-1);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; SWModule *module = (*it).second;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; string key;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;\nPress [CTRL-C] to end\n\n&quot;;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; while (true) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;\nModule text:\n&quot;;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; module-&gt;setKey(&quot;1jn 1:9&quot;);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;[ &quot; &lt;&lt; module-&gt;KeyText() &lt;&lt; &quot; ]\n&quot;;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; (const char *)*module;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;\n\nEnter new cipher key: &quot;;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cin &gt;&gt; key;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;\nSetting key to: &quot; &lt;&lt; key;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;manager.setCipherKey(argv[1], (unsigned char *)key.c_str());<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;<br>&gt;<br>
&gt; }<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">
sword-devel@crosswire.org</a><br>&gt; <a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>&gt; Instructions to unsubscribe/change your settings at above page
<br><br><br>_______________________________________________<br>sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br><a href="http://www.crosswire.org/mailman/listinfo/sword-devel">
http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>Instructions to unsubscribe/change your settings at above page<br></blockquote></div><br>