Building Perl for Win32 as a static library

Discussion in 'Perl Misc' started by Torsten Mohr, Dec 28, 2003.

  1. Torsten Mohr

    Torsten Mohr Guest

    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.
     
    Torsten Mohr, Dec 28, 2003
    #1
    1. Advertising

  2. On Sun, 28 Dec 2003 22:29:54 +0100
    Torsten Mohr <> wrote:

    > 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.
     
    James Willmore, Dec 29, 2003
    #2
    1. Advertising

  3. Torsten Mohr

    Torsten Mohr Guest

    Hi,

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


    > 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.
     
    Torsten Mohr, Dec 30, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Angelico

    Building Python: static library "3.2m"

    Chris Angelico, May 23, 2011, in forum: Python
    Replies:
    0
    Views:
    169
    Chris Angelico
    May 23, 2011
  2. Phil Tomson

    Building static ruby.exe on Win32

    Phil Tomson, Feb 17, 2004, in forum: Ruby
    Replies:
    2
    Views:
    170
  3. Torsten Mohr
    Replies:
    5
    Views:
    243
    Torsten Mohr
    Feb 25, 2004
  4. Michael Edmonson

    Win32::SAPI4 question (Win32 events and Perl)

    Michael Edmonson, Feb 28, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    206
    Michael Edmonson
    Feb 28, 2004
  5. Avi
    Replies:
    0
    Views:
    198
Loading...

Share This Page