D 2014-07-30T15:58:58.430 J foundin 0.22 J icomment I'm\sattempting\sto\swrite\sa\ssmall\swrapper\saround\slibxml2.\sHere\sis\ssome\stest\scode\sto\stry\sand\saccess\sthe\sfunctions\sand\spresent\sthe\serror:\r\n\r\n---\r\npackage\sprovide\stest\s0.1\r\npackage\srequire\stcc4tcl\r\n\r\nset\sLibPath\s[file\sjoin\s[file\sdirname\s[dict\sget\s[info\sframe\s[info\sframe]]\sfile]]]\r\n\r\n#\sObject\sencapsulating\sC\scode\r\nset\sc\s[::tcc4tcl::new]\r\n\r\n#\sAdd\slibrary\spaths\r\n$c\sadd_include_path\s[file\sjoin\s$::xsd::LibPath\sinclude]\r\n$c\sadd_include_path\s[file\sjoin\s$::xsd::LibPath\sinclude\slibxml]\r\n$c\sadd_library_path\s$::xsd::LibPath\r\n$c\sadd_library\slibxml2-2\r\n\r\n#\sTry\sto\suse\sxmlLineNumbersDefault\r\n$c\scproc\stest\s{}\sok\s{\r\n\s\s\s\sxmlLineNumbersDefault(1);\r\n}\r\n\r\n#\sCompile\sC\scode\r\n$c\sgo\r\n---\r\n\r\nThe\sLibPath\svariable\sis\sset\ssuch\sthat\sit\sis\sthe\slocation\sof\sthe\s'test'\spackage\s(where\sI'd\slike\sto\sput\sthe\sinclude\sfiles\sand\slibrary).\sPrinting\sit\sverifies\sthis\spath\sis\salways\sas\sexpected.\r\n\r\nThe\sabove\sfails\swhen\s[package\srequire\stest]\sis\sinvoked\swithin\sany\sdirectory\sexcept\sthe\spackage's\sdirectory.\sWhen\swithin\sthe\spackage's\sdirectory\sthe\spackage\sloads\sfine.\r\n\r\nThe\serror\sreturned\swhen\srunning\s[package\srequire\stest]\sfrom\soutside\sits\sdirectory:\r\n\r\ntcc:\serror:\sundefined\ssymbol\s'xmlLineNumbersDefault'\r\nrelocating\sfailed\r\n\r\nThe\saccompanying\sstack\strace:\r\n\r\ntcc:\serror:\sundefined\ssymbol\s'xmlLineNumbersDefault'\r\nrelocating\sfailed\r\n\s\s\s\swhile\sexecuting\r\n"tcc\scommand\s$procname\s$cname"\r\n\s\s\s\s(procedure\s"::tcc4tcl::_go"\sline\s106)\r\n\s\s\s\sinvoked\sfrom\swithin\r\n"::tcc4tcl::_go\s::tcc4tcl::tcc_1\s0"\r\n\s\s\s\s("uplevel"\sbody\sline\s1)\r\n\s\s\s\sinvoked\sfrom\swithin\r\n"uplevel\s1\s[list\s$callcmd\s$handle\s{*}$args]"\r\n\s\s\s\s(procedure\s"::tcc4tcl::tcc_1"\sline\s19)\r\n\s\s\s\sinvoked\sfrom\swithin\r\n"$c\sgo"\r\n\s\s\s\s(file\s"C:/Home/Tcl/test/test.tcl"\sline\s30)\r\n\s\s\s\sinvoked\sfrom\swithin\r\n"source\sC:/Home/Tcl/test/test.tcl"\r\n\s\s\s\s("package\sifneeded\stest\s0.1"\sscript)\r\n\s\s\s\sinvoked\sfrom\swithin\r\n"package\srequire\stest"\r\n\s\s\s\s("uplevel"\sbody\sline\s1)\r\n\s\s\s\sinvoked\sfrom\swithin\r\n"uplevel\s#0\s{package\srequire\stest}" J login anonymous J mimetype text/x-fossil-plain J severity Critical J status Open J title 'Relocating\sfailed'\serror\sreturned\swhen\scompiling\scproc\safter\ssetting\sdefined\slibrary\slocation J type Code_Defect K 81d35d664d8b3ea11950b30d9eafd636d851bb85 U anonymous Z fa3f98435baacbeedb35b24084b24db2