Ah, excellent - using g++ `pkg-config --cflags sword` ciphercng.cpp `pkg-config --libs sword` 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> <<a href="mailto:scribe@crosswire.org">scribe@crosswire.org
</a>> 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> The error:<br><br> swmgr.h: No such file or directory
<br><br> tells me that you have not installed sword to your include path:<br><br> I/usr/include:/usr/include/sword<br><br> Actually, I'm not sure that syntax is legal. Try:<br><br> I/usr/include -I/usr/include/sword
<br><br> Or better yet, try:<br><br>g++ `pkg-config --cflags sword` ciphercng.cpp `pkg-config --libs sword`<br><br>I'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. My apologies for<br>these not being up to date.<br><br> -Troy.<br><br><br>Chad Johnson wrote:<br>> I'm trying to compile the following program and I get the corresponding
<br>> output. I tried adding using namespace sword; but that did not help.<br>> I was able to compile the examples using the makefile generated from<br>> ./autogen.sh and /usrinst.sh, but what must I do to get this program to
<br>> work? What must my makefile look like? Can I use bakefile? I'd really<br>> like it working soon as I am integrating the SWORD modules with Aletheia<br>> ( <a href="http://aletheia.sourceforge.net">aletheia.sourceforge.net
</a> <<a href="http://aletheia.sourceforge.net">http://aletheia.sourceforge.net</a>>).<br>><br>> chad@chadjohnson:/tmp/sword/examples/cmdline$ g++ -L/usr/lib<br>> -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 `;' before 'manager'<br>> ciphercng.cpp :23: error: 'ModMap' has not been declared<br>> ciphercng.cpp:23: error: expected `;' 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>><br>> *<br>> * This example demonstrates how to change the cipher key of a module<br>
> * The change is only in effect for this run. This DOES NOT change the<br>> * cipherkey in the module's .conf file.<br>> *<br>> */<br>><br>> #include <stdio.h><br>> #include <
swmgr.h><br>> #include <iostream><br>><br>> using namespace std;<br>><br>> int main(int argc, char **argv) {<br>><br>> if (argc != 2) {<br>> fprintf(stderr, "usage: %s <modName>\n", *argv);
<br>> exit(-1);<br>> }<br>><br>> sword::SWMgr manager; // create a default manager that looks<br>> in the current directory for mods.conf<br>> ModMap::iterator it;<br>> it =
manager.Modules.find(argv[1]);<br>><br>> if (it == manager.Modules.end()) {<br>> fprintf(stderr, "%s: couldn't find module: %s\n", *argv, argv[1]);<br>> exit(-1);<br>> }
<br>><br>> SWModule *module = (*it).second;<br>> string key;<br>><br>> cout << "\nPress [CTRL-C] to end\n\n";<br>> while (true) {<br>> cout << "\nModule text:\n";
<br>> module->setKey("1jn 1:9");<br>> cout << "[ " << module->KeyText() << " ]\n";<br>> cout << (const char *)*module;<br>> cout << "\n\nEnter new cipher key: ";
<br>> cin >> key;<br>> cout << "\nSetting key to: " << key;<br>> manager.setCipherKey(argv[1], (unsigned char *)key.c_str());<br>> }<br>><br>><br>
> }<br>><br>><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><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>