So in the process of including TinyXML++ in my ruleset I've run into a little dilema. Do dump the 8 or so source files into my ruleset directory, or more formally create a module called ticpp (or anything, really) and then use that module from within the ruleset?
It was my impression that dumping the source files was a bad idea, so up until now I have been attempting to create a module/lib for "ticpp." I have no problem compiling and installing the lib, and it appears as if a proper directory is being created to house it, but I am unable to load the lib at runtime. Here are the bits and pieces... configure.ac: I added "modules/ticpp/Makefile" to "AC_CONFIG_FILES Makefile.am in modules: Changed to "SUBDIRS = games persistence tpcl ticpp" I should note, that all my source files for ticpp are located in modules/ticpp Makefile.am in ticpp: > ## Process this file with automake to produce Makefile.in > > rulesetlib_LTLIBRARIES = libticpp.la > > rulesetlibdir = $(libdir)/tpserver/ticpp > #All .cpp's > libticpp_la_SOURCES = ticpp.cpp tinystr.cpp tinyxml.cpp > tinyxmlerror.cpp tinyxmlparser.cpp > > libticpp_la_LDFLAGS = -module > > #All the .h's > noinst_HEADERS = ticpp.h ticpprc.h tinystr.h tinyxml.h Now at this point I get a little confused about how to actually USE the module. The source file of mine that uses TinyXML is mapimport.cpp. At present I can get by with "#include "modules/ticpp/ ticpp.h", and everything make's correctly (that is to say I can actually use parts of the TinyXML library.) I encounter a problem at runtime, however, with this error: > 2008-07-11 13:07:22 < Error > Failed to load plugin "/opt/tpserver- > cpp/lib/tpserver/ruleset/librisk": "dlopen(/opt/tpserver-cpp/lib/ > tpserver/ruleset/librisk.0.so, 9): Symbol not found: > __ZTV13TiXmlDocument > Referenced from: /opt/tpserver-cpp/lib/tpserver/ruleset/librisk.0.so > Expected in: dynamic lookup > " 0x0 > 2008-07-11 13:07:22 <Warning> Did not load ruleset "risk" Not totally unexpected, obviously I haven't loaded the libticpp module. I add "autoload_plugins = /opt/tpserver-cpp/lib/tpserver/ticpp/ libticpp" to my config file, but the lib won't load, coming back with this error: > 2008-07-11 13:07:22 < Error > Failed to load plugin "/opt/tpserver- > cpp/lib/tpserver/ticpp/libticpp": "(null)" 0x0 I'm obviously doing some things wrong here, and I would appreciate any help in getting things going. I'll commit my WIP branch to my Risk branch and make sure things still run correctly without map import, incase anyone would like to take a look at my source. Please let me know if you need additional info. Thanks, Ryan 'jphr' Neufeld --------------------------- visit me at hammerofcode.com _______________________________________________ tp-devel mailing list [email protected] http://www.thousandparsec.net/tp/mailman.php/listinfo/tp-devel
