Someone can tell me how integrate VC++ with perl

Discussion in 'Perl Misc' started by lala4life, Feb 6, 2007.

  1. lala4life

    lala4life Guest

    I look for some doc in the network, but didn't find any usefull, i
    have experience programing with perl but no with VC++, at least with
    this topic.

    If someone can tell where can get examples it really nice.
     
    lala4life, Feb 6, 2007
    #1
    1. Advertising

  2. lala4life

    Mirco Wahab Guest

    lala4life wrote:
    > I look for some doc in the network, but didn't find any usefull, i
    > have experience programing with perl but no with VC++, at least with
    > this topic.


    To do what?

    > If someone can tell where can get examples it really nice.


    For what?

    "integrating Perl-Code-Modules into a VC++-Programm"
    or
    "integrating VC++-Code-Modules into a Perl-Programm"?
    or something else?

    Regards

    Mirco
     
    Mirco Wahab, Feb 6, 2007
    #2
    1. Advertising

  3. lala4life

    lala4life Guest

    Re: Someone can tell me how integrate VC++ with perl

    On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    > lala4life wrote:
    > > I look for some doc in the network, but didn't find any usefull, i
    > > have experience programing with perl but no with VC++, at least with
    > > this topic.

    >
    > To do what?
    >
    > > If someone can tell where can get examples it really nice.

    >
    > For what?
    >
    > "integrating Perl-Code-Modules into a VC++-Programm"
    > or
    > "integrating VC++-Code-Modules into a Perl-Programm"?
    > or something else?
    >
    > Regards
    >
    > Mirco


    I need to integrate Perl functionalities into a VC++ program. con you
    help me with that?
     
    lala4life, Feb 6, 2007
    #3
  4. lala4life

    Mirco Wahab Guest

    Re: Someone can tell me how integrate VC++ with perl

    lala4life wrote:
    > On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    >> For what?
    >>
    >> "integrating Perl-Code-Modules into a VC++-Programm"
    >> or
    >> "integrating VC++-Code-Modules into a Perl-Programm"?
    >> or something else?
    >>
    >> Regards
    >>
    >> Mirco

    >
    > I need to integrate Perl functionalities into a VC++ program. con you
    > help me with that?


    OK, which Version of VC do you have?

    Which Perl version do you use?


    Regards

    M.
     
    Mirco Wahab, Feb 6, 2007
    #4
  5. lala4life

    lala4life Guest

    Re: Someone can tell me how integrate VC++ with perl

    On Feb 6, 3:27 pm, Mirco Wahab <> wrote:
    > lala4life wrote:
    > > On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    > >> For what?

    >
    > >> "integrating Perl-Code-Modules into a VC++-Programm"
    > >> or
    > >> "integrating VC++-Code-Modules into a Perl-Programm"?
    > >> or something else?

    >
    > >> Regards

    >
    > >> Mirco

    >
    > > I need to integrate Perl functionalities into a VC++ program. con you
    > > help me with that?

    >
    > OK, which Version of VC do you have?
    >
    > Which Perl version do you use?
    >
    > Regards
    >
    > M.


    VC++ 6.0 and perl 5.8.
     
    lala4life, Feb 6, 2007
    #5
  6. lala4life

    Mirco Wahab Guest

    Re: Someone can tell me how integrate VC++ with perl

    lala4life wrote:
    > On Feb 6, 3:27 pm, Mirco Wahab <> wrote:
    >> lala4life wrote:
    >>> On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    >>>> For what?
    >>> I need to integrate Perl functionalities into a VC++ program.

    >> OK, which Version of VC do you have?
    >> Which Perl version do you use?

    >
    > VC++ 6.0 and perl 5.8.


    Good.

    Where's your Perl installed to? c:\perl? d:\perl?
    (Is it Activestate's Perl distribution?)

    Regards

    Mirco
     
    Mirco Wahab, Feb 6, 2007
    #6
  7. lala4life

    lala4life Guest

    Re: Someone can tell me how integrate VC++ with perl

    On Feb 6, 4:37 pm, Michele Dondi <> wrote:
    > On 6 Feb 2007 07:49:47 -0800, "lala4life" <>
    > wrote:
    >
    > >I look for some doc in the network, but didn't find any usefull, i
    > >have experience programing with perl but no with VC++, at least with
    > >this topic.

    >
    > >If someone can tell where can get examples it really nice.

    >
    > I'm not really sure about what you're asking about but someone wrote a
    > tutorial about a somewhat related topic at Perl Monks:
    >
    > http://perlmonks.org/index.pl?node_id=583586
    >
    > Michele
    > --
    > {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
    > (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
    > .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
    > 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


    this article it to make operative CPAN module in windows XP with
    visual studio 2005, that mean
    perl -MCPAN -e shell; > install XXX::MODULE
    work calling the right compiler for win32, not make command of linux.
     
    lala4life, Feb 6, 2007
    #7
  8. lala4life

    Guest

    Re: Someone can tell me how integrate VC++ with perl

    On Feb 6, 3:29 pm, Mirco Wahab <> wrote:
    > lala4life wrote:
    > > On Feb 6, 3:27 pm, Mirco Wahab <> wrote:
    > >> lala4life wrote:
    > >>> On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    > >>>> For what?
    > >>> I need to integrate Perl functionalities into a VC++ program.
    > >> OK, which Version of VC do you have?
    > >> Which Perl version do you use?

    >
    > > VC++ 6.0 and perl 5.8.

    >
    > Good.
    >
    > Where's your Perl installed to? c:\perl? d:\perl?
    > (Is it Activestate's Perl distribution?)
    >
    > Regards
    >
    > Mirco


    Can you breifly describe the problem you are trying to resolve?

    Just by reading your posting, I can't fathom, if you are interested
    to run perl scripts from a C++ program or the otherway around!

    Regards,
    Manish
     
    , Feb 6, 2007
    #8
  9. lala4life

    lala4life Guest

    Re: Someone can tell me how integrate VC++ with perl

    On Feb 6, 5:29 pm, Mirco Wahab <> wrote:
    > lala4life wrote:
    > > On Feb 6, 3:27 pm, Mirco Wahab <> wrote:
    > >> lala4life wrote:
    > >>> On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    > >>>> For what?
    > >>> I need to integrate Perl functionalities into a VC++ program.
    > >> OK, which Version of VC do you have?
    > >> Which Perl version do you use?

    >
    > > VC++ 6.0 and perl 5.8.

    >
    > Good.
    >
    > Where's your Perl installed to? c:\perl? d:\perl?
    > (Is it Activestate's Perl distribution?)
    >
    > Regards
    >
    > Mirco


    yeap your right i have a activestate distribution , under c:\perl
     
    lala4life, Feb 6, 2007
    #9
  10. lala4life

    lala4life Guest

    Re: Someone can tell me how integrate VC++ with perl

    On Feb 6, 6:25 pm, "" <> wrote:
    > On Feb 6, 3:29 pm, Mirco Wahab <> wrote:
    >
    >
    >
    > > lala4life wrote:
    > > > On Feb 6, 3:27 pm, Mirco Wahab <> wrote:
    > > >> lala4life wrote:
    > > >>> On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    > > >>>> For what?
    > > >>> I need to integrate Perl functionalities into a VC++ program.
    > > >> OK, which Version of VC do you have?
    > > >> Which Perl version do you use?

    >
    > > > VC++ 6.0 and perl 5.8.

    >
    > > Good.

    >
    > > Where's your Perl installed to? c:\perl? d:\perl?
    > > (Is it Activestate's Perl distribution?)

    >
    > > Regards

    >
    > > Mirco

    >
    > Can you breifly describe the problem you are trying to resolve?
    >
    > Just by reading your posting, I can't fathom, if you are interested
    > to run perl scripts from a C++ program or the otherway around!
    >
    > Regards,
    > Manish


    i have an aplication that send me data to my web site, there is
    processing. nothing unsual.
    well i made some perl script that do the job in "shedule task" over a
    win32 server, but that mean have a perl interpreter installed on
    server (my client doesn't like that)

    So i think, if i can call a perl interpreter or an instance of perl
    or pack this script within VC++ program, that solve my problem after
    all Perl is c program. I don´t know if this is possible over win32 or
    was that yet another dream induced by late night pizza.
     
    lala4life, Feb 6, 2007
    #10
  11. lala4life

    lala4life Guest

    Re: Someone can tell me how integrate VC++ with perl

    On Feb 6, 6:25 pm, "" <> wrote:
    > On Feb 6, 3:29 pm, Mirco Wahab <> wrote:
    >
    >
    >
    > > lala4life wrote:
    > > > On Feb 6, 3:27 pm, Mirco Wahab <> wrote:
    > > >> lala4life wrote:
    > > >>> On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    > > >>>> For what?
    > > >>> I need to integrate Perl functionalities into a VC++ program.
    > > >> OK, which Version of VC do you have?
    > > >> Which Perl version do you use?

    >
    > > > VC++ 6.0 and perl 5.8.

    >
    > > Good.

    >
    > > Where's your Perl installed to? c:\perl? d:\perl?
    > > (Is it Activestate's Perl distribution?)

    >
    > > Regards

    >
    > > Mirco

    >
    > Can you breifly describe the problem you are trying to resolve?
    >
    > Just by reading your posting, I can't fathom, if you are interested
    > to run perl scripts from a C++ program or the otherway around!
    >
    > Regards,
    > Manish


    Well, i need to do some post process to send data to my web site, over
    win32, usually call the perl script with "Schedule Task" but that mean
    have a distribution of perl installed on the server, my client doen't
    like the idea.

    I don't know if is possible pack perl functionality or call ans
    instance of perl within a VC++ program or was that yet another dream
    induced by late night pizza.
     
    lala4life, Feb 6, 2007
    #11
  12. lala4life

    Mirco Wahab Guest

    Re: Someone can tell me how integrate VC++ with perl

    lala4life wrote:
    > On Feb 6, 5:29 pm, Mirco Wahab <> wrote:
    >> lala4life wrote:
    >>> On Feb 6, 3:27 pm, Mirco Wahab <> wrote:
    >>>> lala4life wrote:
    >>>>> On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    >>>>>> For what?
    >>>>> I need to integrate Perl functionalities into a VC++ program.
    >>>> OK, which Version of VC do you have?
    >>>> Which Perl version do you use?
    >>> VC++ 6.0 and perl 5.8.

    >> Where's your Perl installed to? c:\perl? d:\perl?
    >> (Is it Activestate's Perl distribution?)

    >
    > yeap your right i have a activestate distribution , under c:\perl
    >


    Then you could do the following:
    1) Start Visual C++, open your project
    2) in
    [Tools]->Options->|Directories|
    choose "Include Files" (Show Directories for ...)
    and add
    C:\Perl\lib\CORE
    in the empty line below the other lines
    3) in
    [Tools]->Options->|Directories|
    choose "Library Files" (Show Directories for ...)
    and add
    C:\Perl\lib\CORE
    in the empty line below the other lines
    4)in
    [Project]->Settings->|Link|
    choose Category "General"
    and find the line "Object/Library modules"
    at the end of the stuff add (delimited by space): perl58.lib
    press ok

    Then save all your project settings. You are now
    able to inlucde the Perl-interpreter into your
    program.

    Now write the following code (for testing):

    ...
    #include <stdio.h>

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

    PerlInterpreter *my_perl;
    static char *embedding[] = { "", "-e", "0" };

    int main(int argc, char **argv, char **envp)
    {
    int i;
    SV * s_pre;

    PERL_SYS_INIT3( &argc, &argv, &envp );
    my_perl = perl_alloc();
    perl_construct( my_perl );
    perl_parse(my_perl, 0, 3, embedding, envp);
    PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
    perl_run(my_perl);


    rbuffer = new char [64000];

    // write some program arguments to Perl (see what happens)
    for(i=1; i<argc; i++) {
    sprintf(rbuffer,"push @ARGV,'%s';", argv);
    s_pre = eval_pv( rbuffer, TRUE );
    }

    perl_destruct( my_perl );
    perl_free ( my_perl );
    PERL_SYS_TERM();

    return 0;
    }

    If that compiles and runs, you are through.

    Next step:

    Write sime Perl programs "in place", like

    const char someprogram[] =
    {
    " print \"Perl loaded o.k.\"; \n"
    " print \" <== \", Perl $] on $^O \"\\n\"; \n"
    "1;"
    };

    and invoke by:

    ...
    s_pre = eval_pv( someprogram, TRUE );
    if( SvIV(s_pre) != 1 ) {
    perror("test prog didn't execute\n");
    exit(-1);
    }
    ...

    or load another perl source file (do ...) from there.

    But one step after the other ;-)

    Regards

    M.
     
    Mirco Wahab, Feb 6, 2007
    #12
  13. lala4life

    Mirco Wahab Guest

    typo

    Mirco Wahab wrote:
    > " print \" <== \", Perl $] on $^O \"\\n\"; \n"

    ^
    | There's a ""-group missing
    or in the wrong place, correct:

    ...
    " print \" <== Perl $] on $^O \\n\"; \n"
    ...


    Sorry,

    M.
     
    Mirco Wahab, Feb 6, 2007
    #13
  14. lala4life

    Sisyphus Guest

    "lala4life" <> wrote in message
    news:...
    >I look for some doc in the network, but didn't find any usefull, i
    > have experience programing with perl but no with VC++, at least with
    > this topic.
    >
    > If someone can tell where can get examples it really nice.
    >


    See 'perldoc perlembed'.

    Cheers,
    Rob
     
    Sisyphus, Feb 6, 2007
    #14
  15. lala4life

    Sisyphus Guest

    Re: Someone can tell me how integrate VC++ with perl

    "lala4life" <> wrote in message
    news:...
    ..
    ..
    i have an aplication that send me data to my web site, there is
    processing. nothing unsual.
    well i made some perl script that do the job in "shedule task" over a
    win32 server, but that mean have a perl interpreter installed on
    server (my client doesn't like that)

    ----------------------------------

    Another option is to compile your perl script into a stand-alone executable
    (using the PAR module's pp utility).

    Cheers,
    Rob
     
    Sisyphus, Feb 6, 2007
    #15
  16. Re: Someone can tell me how integrate VC++ with perl

    Mirco Wahab <> writes:

    > lala4life wrote:
    >> On Feb 6, 3:27 pm, Mirco Wahab <> wrote:
    >>> lala4life wrote:
    >>>> On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    >>>>> For what?
    >>>> I need to integrate Perl functionalities into a VC++ program.
    >>> OK, which Version of VC do you have?
    >>> Which Perl version do you use?

    >>
    >> VC++ 6.0 and perl 5.8.

    >
    > Good.
    >
    > Where's your Perl installed to? c:\perl? d:\perl?
    > (Is it Activestate's Perl distribution?)


    Ever feel like a prosecutor trying to question a hostile witness? :)

    sherm--

    --
    Web Hosting by West Virginians, for West Virginians: http://wv-www.net
    Cocoa programming in Perl: http://camelbones.sourceforge.net
     
    Sherm Pendley, Feb 7, 2007
    #16
  17. lala4life

    Mirco Wahab Guest

    Re: Someone can tell me how integrate VC++ with perl

    Sherm Pendley wrote:
    > Mirco Wahab <> writes:
    >
    >> lala4life wrote:
    >>> On Feb 6, 3:27 pm, Mirco Wahab <> wrote:
    >>>> lala4life wrote:
    >>>>> On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    >>>>>> For what?
    >>>>> I need to integrate Perl functionalities into a VC++ program.
    >>>> OK, which Version of VC do you have?
    >>>> Which Perl version do you use?
    >>> VC++ 6.0 and perl 5.8.

    >> Good.
    >> Where's your Perl installed to? c:\perl? d:\perl?

    >
    > Ever feel like a prosecutor trying to question a hostile witness? :)


    Oh!

    No, if he'd be "hostile", we'd give him a soft chair,
    are very very friendly, smile, give him coffee and
    approach him as "Lieber Herr Fachmann¹" ...

    Regards

    M.



    ¹ "Dear Mr. Expert"
     
    Mirco Wahab, Feb 7, 2007
    #17
  18. lala4life

    lala4life Guest

    Re: Someone can tell me how integrate VC++ with perl

    On Feb 6, 7:29 pm, Mirco Wahab <> wrote:
    > lala4life wrote:
    > > On Feb 6, 5:29 pm, Mirco Wahab <> wrote:
    > >> lala4life wrote:
    > >>> On Feb 6, 3:27 pm, Mirco Wahab <> wrote:
    > >>>> lala4life wrote:
    > >>>>> On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    > >>>>>> For what?
    > >>>>> I need to integrate Perl functionalities into a VC++ program.
    > >>>> OK, which Version of VC do you have?
    > >>>> Which Perl version do you use?
    > >>> VC++ 6.0 and perl 5.8.
    > >> Where's your Perl installed to? c:\perl? d:\perl?
    > >> (Is it Activestate's Perl distribution?)

    >
    > > yeap your right i have a activestate distribution , under c:\perl

    >
    > Then you could do the following:
    > 1) Start Visual C++, open your project
    > 2) in
    > [Tools]->Options->|Directories|
    > choose "Include Files" (Show Directories for ...)
    > and add
    > C:\Perl\lib\CORE
    > in the empty line below the other lines
    > 3) in
    > [Tools]->Options->|Directories|
    > choose "Library Files" (Show Directories for ...)
    > and add
    > C:\Perl\lib\CORE
    > in the empty line below the other lines
    > 4)in
    > [Project]->Settings->|Link|
    > choose Category "General"
    > and find the line "Object/Library modules"
    > at the end of the stuff add (delimited by space): perl58.lib
    > press ok
    >
    > Then save all your project settings. You are now
    > able to inlucde the Perl-interpreter into your
    > program.
    >
    > Now write the following code (for testing):
    >
    > ...
    > #include <stdio.h>
    >
    > #include <EXTERN.h>
    > #include <perl.h>
    > ...
    >
    > PerlInterpreter *my_perl;
    > static char *embedding[] = { "", "-e", "0" };
    >
    > int main(int argc, char **argv, char **envp)
    > {
    > int i;
    > SV * s_pre;
    >
    > PERL_SYS_INIT3( &argc, &argv, &envp );
    > my_perl = perl_alloc();
    > perl_construct( my_perl );
    > perl_parse(my_perl, 0, 3, embedding, envp);
    > PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
    > perl_run(my_perl);
    >
    > rbuffer = new char [64000];
    >
    > // write some program arguments to Perl (see what happens)
    > for(i=1; i<argc; i++) {
    > sprintf(rbuffer,"push @ARGV,'%s';", argv);
    > s_pre = eval_pv( rbuffer, TRUE );
    > }
    >
    > perl_destruct( my_perl );
    > perl_free ( my_perl );
    > PERL_SYS_TERM();
    >
    > return 0;
    > }
    >
    > If that compiles and runs, you are through.
    >
    > Next step:
    >
    > Write sime Perl programs "in place", like
    >
    > const char someprogram[] =
    > {
    > " print \"Perl loaded o.k.\"; \n"
    > " print \" <== \", Perl $] on $^O \"\\n\"; \n"
    > "1;"
    >
    > };
    >
    > and invoke by:
    >
    > ...
    > s_pre = eval_pv( someprogram, TRUE );
    > if( SvIV(s_pre) != 1 ) {
    > perror("test prog didn't execute\n");
    > exit(-1);
    > }
    > ...
    >
    > or load another perl source file (do ...) from there.
    >
    > But one step after the other ;-)
    >
    > Regards
    >
    > M.


    Thanks
     
    lala4life, Feb 7, 2007
    #18
  19. Re: Someone can tell me how integrate VC++ with perl

    Mirco Wahab wrote:
    > Sherm Pendley wrote:
    >> Mirco Wahab <> writes:
    >>
    >>> lala4life wrote:
    >>>> On Feb 6, 3:27 pm, Mirco Wahab <> wrote:
    >>>>> lala4life wrote:
    >>>>>> On Feb 6, 1:09 pm, Mirco Wahab <> wrote:
    >>>>>>> For what?
    >>>>>> I need to integrate Perl functionalities into a VC++ program.
    >>>>> OK, which Version of VC do you have?
    >>>>> Which Perl version do you use?
    >>>> VC++ 6.0 and perl 5.8.
    >>> Good.
    >>> Where's your Perl installed to? c:\perl? d:\perl?

    >>
    >> Ever feel like a prosecutor trying to question a hostile witness? :)

    >
    > Oh!
    >
    > No, if he'd be "hostile", we'd give him a soft chair,
    > are very very friendly, smile, give him coffee and
    > approach him as "Lieber Herr Fachmann¹" ...


    OH NO ... not the soft chair!



    John
    --
    Perl isn't a toolbox, but a small machine shop where you can special-order
    certain sorts of tools at low cost and in short order. -- Larry Wall
     
    John W. Krahn, Feb 7, 2007
    #19
  20. Re: Someone can tell me how integrate VC++ with perl

    John W. Krahn wrote:
    > Mirco Wahab wrote:


    >>No, if he'd be "hostile", we'd give him a soft chair,
    >>are very very friendly, smile, give him coffee and
    >>approach him as "Lieber Herr Fachmann¹" ...

    >
    >
    > OH NO ... not the soft chair!


    Noooooo, ............. the .... comfy chair!

    Hah! You didn't expect the spanish inquisition!

    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett
     
    Josef Moellers, Feb 8, 2007
    #20
    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. Richard Sloan

    Can someone tell me what this is doing

    Richard Sloan, Jan 8, 2006, in forum: Perl
    Replies:
    1
    Views:
    2,166
    Jon Phipps
    May 19, 2006
  2. =?Utf-8?B?QmlnYWw=?=

    Can someone tell me what is wrong here?

    =?Utf-8?B?QmlnYWw=?=, Aug 11, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    600
    =?Utf-8?B?QmlnYWw=?=
    Aug 12, 2005
  3. George Styles
    Replies:
    6
    Views:
    1,691
    jeffc
    Jan 16, 2004
  4. marco
    Replies:
    2
    Views:
    358
    marco
    Sep 2, 2004
  5. Andreas Sheriff
    Replies:
    10
    Views:
    737
    Jack Klein
    Sep 25, 2004
Loading...

Share This Page