Thank you for replying, glad it gave you something to try. I am going through your OP to pick out any information that I might have missed the first time.

First thing that strikes me is that you moved the library. We know nothing about how you built the XS libararies, so did you literally move it or did you rebuild it in the new location? I suspect that there is an issue with the libaries you built thinking they are in the original location (just a stretch guess).

Second thing is that DynaLoader is for Perl modules, so I was confused that this was being used to create and export your XS libraries. After educating myself a bit on DynaLoader, I see that it says:

It must be stressed that the DynaLoader, by itself, is practically useless for accessing non-Perl libraries because it provides almost no Perl-to-C 'glue'. There is, for example, no mechanism for calling a C library function or supplying arguments. A C::DynaLib module is available from CPAN sites which performs that function for some common system types. And since the year 2000, there's also Inline::C, a module that allows you to write Perl subroutines in C. Also available from your local CPAN site..

My suggestion is to take DynaLoader out of this altogether. Seems like you don't need it at all. XS based modules should work as normal if you just did a use My::XS::Module. On CPAN, XS based modules are not distributed as pre-compiled blobs, they are compiled and installed when you "install" the module. So get back to the basics:

  1. make sure you've rebuilt your XS modules for the new location
  2. get it to work in a simple script without DynaLoader with, use My::XS::Module
  3. make sure the lib directory in /path/to/lib/My::XS::Module is in @INC

Then iterate on that until you get it to work, once that happens you can translate what you did in the simple program. I am getting the feeling that the root of the issue is that you may have literally mv'd the libraries to the new location rather than rebuilding them.


In reply to Re^3: XSLoader/DynaLoader Can't Locate Library by perlfan
in thread XSLoader/DynaLoader Can't Locate Library by wbirkett

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.