QUICK Help. h2xs Extending Perl Question 
Author Message
 QUICK Help. h2xs Extending Perl Question

Hi

  I am trying to embed some C code into Perl but
when I run the script through perl I get a error in loading shared
libraries:/usr/lib/perl5/site_perl/i386-linux/auto/Encrypt/Encrypt.so.

  Additonal information is as follows.  The call
to h2xs -x -n Encrypt /somepath/encrypt.h.

encryp.h is just a one line prototype as follows

extern char* Encrypt( char *Key, char *Data, int DataSize);

The Makefile.PL that was generated is below.
I did not know what to do as far modification goes.  A book have said
that you you must
modify the LIB lines abd the OBJECT lines (But there are no OBJECT
lines).  I don't know what
to put for the LIB lines.

use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    'NAME'      => 'Encrypt',
    'VERSION_FROM' => 'Encrypt.pm', # finds     $VERSION
    'LIBS'      => [''],   # e.g., '-lm'
    'DEFINE'    => '',     # e.g., '-  DHAVE_SOMETHING'
    'INC'       => '',     # e.g., '- I/usr/include/other'
);

I will be happy to provide any additonal information if requested

Thanks

Kang

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 QUICK Help. h2xs Extending Perl Question

Quote:

>The Makefile.PL that was generated is below.
>I did not know what to do as far modification goes.  A book have said
>that you you must
>modify the LIB lines abd the OBJECT lines (But there are no OBJECT
>lines).  I don't know what
>to put for the LIB lines.

>use ExtUtils::MakeMaker;
># See lib/ExtUtils/MakeMaker.pm for details of how to influence
># the contents of the Makefile that is written.
>WriteMakefile(
>    'NAME'  => 'Encrypt',
>    'VERSION_FROM' => 'Encrypt.pm', # finds     $VERSION
>    'LIBS'  => [''],   # e.g., '-lm'
>    'DEFINE'        => '',     # e.g., '-  DHAVE_SOMETHING'
>    'INC'   => '',     # e.g., '- I/usr/include/other'
>);

Try something like

    'LIBS'      => ['-lcrypt'],   # e.g., '-lm'

if your system has libcrypt.a in the expected place.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can anybody help me with a quick perl question

2. Help Quick - Easy Newbie String Question

3. HELP - QUICK Question!!!

4. quick regular expression question, please help!

5. Quick Sockets question - please help!

6. Extending Perl with C library - HELP!

7. h2xs question / creating a new module

8. h2xs question

9. quick question about installing perl modules

10. quick perl newbie question: nested functions.

11. Some quick Perl questions

12. *Quick* Perl Question

 

 
Powered by phpBB® Forum Software