Building Perl for Win32 as a static library

T

Torsten Mohr

Hi,

i compiled and installed Perl for Win32 successfully, but i'd like
to build own programs with perl as an internal script language
and i don't want to ship a DLL with that program.
Therefor i'd like to build perl as a static library.

Has anybody got a hint on how to build perl as a static library
on Windows 2000?


Thanks for any hints,
Torsten.
 
J

James Willmore

i compiled and installed Perl for Win32 successfully, but i'd like
to build own programs with perl as an internal script language
and i don't want to ship a DLL with that program.
Therefor i'd like to build perl as a static library.

Has anybody got a hint on how to build perl as a static library
on Windows 2000?


Thanks for any hints,

Several hints :)

Use Goggle (this has been asked and answered before).
perldoc -q 'compile'
perldoc -q 'embed'
Check out SWIG (http://www.swig.org)
perldoc perlembed

HTH

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
Next Friday will not be your lucky day. As a matter of fact, you
don't have a lucky day this year.
 
T

Torsten Mohr

Hi,
Several hints :)

Use Goggle (this has been asked and answered before).
perldoc -q 'compile'
perldoc -q 'embed'
Check out SWIG (http://www.swig.org)
perldoc perlembed

thanks for helping, but i can't find any information in there
related to this problem. Maybe i did not describe it properly
what i want. I'll try again:

I want to compile own C programs. In these C programs i want
to use something like this:

#include <EXTERN.h>
#include <embed.h>
#include <perl.h>

static Perl_Interpreter* my_perl;

then in main():

....
my_perl = perl_alloc();
perl_construct(my_perl);

I then want to let the Perl_Interpreter evaluate commands.
This works fine, except that i have to install the program
AND "libperl.dll" on systems where the program should run.

So i'd like to link my program not against the DYNAMIC perl
library, but against a STATIC library. On Unix systems i know
how to do this, but on Windows i'm a bit lost, even with
creating the static perl library.

Can anybody give me a hint on how to create a static Perl
library on Windows?


Thanks for any hints,
Torsten.


P.S.: I just asked something similar in comp.lang.tcl,
there it is possible quite easily to create static libraries
just by giving "OPTS=static" when building perl.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top