Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^7: shared-obj linking in xs-module

by rafl (Friar)
on Mar 16, 2006 at 15:00 UTC ( [id://537162]=note: print w/replies, xml ) Need Help??


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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://537162]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-26 01:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found