I'm trying to compile the following program and I get the corresponding output. I tried adding   using namespace sword;   but that did not help. I was able to compile the examples using the makefile generated from ./autogen.sh and /usrinst.sh, but what must I do to get this program to work? What must my makefile look like? Can I use bakefile? I'd really like it working soon as I am integrating the SWORD modules with Aletheia (
<a href="http://aletheia.sourceforge.net">aletheia.sourceforge.net</a>).<br><br>chad@chadjohnson:/tmp/sword/examples/cmdline$ g++ -L/usr/lib -I/usr/include:/usr/include/sword ciphercng.cpp <br>ciphercng.cpp:10:19: error: 
swmgr.h: No such file or directory<br>ciphercng.cpp: In function 'int main(int, char**)':<br>ciphercng.cpp:22: error: 'sword' has not been declared<br>ciphercng.cpp:22: error: expected `;&#39; before 'manager'<br>ciphercng.cpp
:23: error: 'ModMap' has not been declared<br>ciphercng.cpp:23: error: expected `;&#39; before 'it'<br>ciphercng.cpp:24: error: 'it' was not declared in this scope<br>ciphercng.cpp:24: error: 'manager' was not declared in this scope
<br>ciphercng.cpp:31: error: 'SWModule' was not declared in this scope<br>ciphercng.cpp:31: error: 'module' was not declared in this scope<br><br><br><br><br>/******************************************************************************
<br>&nbsp;*<br>&nbsp;* This example demonstrates how to change the cipher key of a module<br>&nbsp;*&nbsp;&nbsp; &nbsp;The change is only in effect for this run.&nbsp; This DOES NOT change the<br>&nbsp;*&nbsp;&nbsp; &nbsp;cipherkey in the module&#39;s .conf file.<br>&nbsp;*<br>&nbsp;*/
<br><br>#include &lt;stdio.h&gt;<br>#include &lt;swmgr.h&gt;<br>#include &lt;iostream&gt;<br><br>using namespace std;<br><br>int main(int argc, char **argv) {<br><br>&nbsp;&nbsp; &nbsp;if (argc != 2) {<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;fprintf(stderr, &quot;usage: %s &lt;modName&gt;\n&quot;, *argv);
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;exit(-1);<br>&nbsp;&nbsp; &nbsp;}<br><br>&nbsp;&nbsp; &nbsp;sword::SWMgr manager;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// create a default manager that looks in the current directory for mods.conf<br>&nbsp;&nbsp; &nbsp;ModMap::iterator it;<br>&nbsp;&nbsp; &nbsp;it = manager.Modules.find(argv[1]);<br>
<br>&nbsp;&nbsp; &nbsp;if (it == manager.Modules.end()) {<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;fprintf(stderr, &quot;%s: couldn&#39;t find module: %s\n&quot;, *argv, argv[1]);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;exit(-1);<br>&nbsp;&nbsp; &nbsp;}<br><br>&nbsp;&nbsp; &nbsp;SWModule *module = (*it).second;<br>&nbsp;&nbsp; &nbsp;string key;
<br><br>&nbsp;&nbsp; &nbsp;cout &lt;&lt; &quot;\nPress [CTRL-C] to end\n\n&quot;;<br>&nbsp;&nbsp; &nbsp;while (true) {<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;cout &lt;&lt; &quot;\nModule text:\n&quot;;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;module-&gt;setKey(&quot;1jn 1:9&quot;);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;cout &lt;&lt; &quot;[ &quot; &lt;&lt; module-&gt;KeyText() &lt;&lt; &quot; ]\n&quot;;
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;cout &lt;&lt; (const char *)*module;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;cout &lt;&lt; &quot;\n\nEnter new cipher key: &quot;;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;cin &gt;&gt; key;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;cout &lt;&lt; &quot;\nSetting key to: &quot; &lt;&lt; key;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
manager.setCipherKey(argv[1], (unsigned char *)key.c_str());<br>&nbsp;&nbsp; &nbsp;}<br><br><br>}<br>