in reply to Re^6: shared-obj linking in xs-module
in thread shared-obj linking in xs-module

You mean only shared-objects without header files?

It'll work the same way as in C, so as almost everything concerning XS works the sam way as in C as it actually only is preprocessed C code that links against a library called libperl, which is written in C as well.

Flo

Replies are listed 'Best First'.
Re^8: shared-obj linking in xs-module
by warlock (Initiate) on Mar 16, 2006 at 15:03 UTC
    Sorry, but you used obj-files in your example. So, if you have just the header-file and the shared-object, how can you do?

      Those object files are part of my XS glue. They are build from the .c files generated form my .xs files. They corespond to helloworld.o in your example. They are not part of the library I'm binding to perl.

      Flo

        Sorry, I did not understand youe example. I thought that you linked all obj-file in one sh-obj, and it functions off course. Now I have seen that you use the tipical "-L<path> -l<lib>" C options.

        I tried to do the same in my Makefile, but is does not function, and returns the following error:
        libmyprint.so: cannot open shared object file: No such file or directo +ry at /usr/local/lib/perl5/5.8.7/i686-linux/DynaLoader.pm line 230.
        It looks like that I must tell to Perl where is my sh-object. I am tring with @dl_library_path in pm-file, but no success again...

        have you a suggestion for me?