[25853] in Perl-Users-Digest
Perl-Users Digest, Issue: 8088 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 17 14:05:20 2005
Date: Tue, 17 May 2005 11:05:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 17 May 2005 Volume: 10 Number: 8088
Today's topics:
Including modules in embedded perl with VC++ <pump_yo_brakes@hotgetridofthisbitmail.com>
Re: Including modules in embedded perl with VC++ <pump_yo_brakes@hotgetridofthisbitmail.com>
Re: Start server for test ? <kr@casalogic.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 17 May 2005 22:56:11 +0930
From: Mr Hyde <pump_yo_brakes@hotgetridofthisbitmail.com>
Subject: Including modules in embedded perl with VC++
Message-Id: <alrj815isfjomkg3gt1i57ua5mkinrmu3r@4ax.com>
Hi guys,
I don't know if you'll be able to help me with this, but I'll give it
a go...
I'm trying to embed some perl in a VC++ program using the following
code:
char *embedding[] = { "", "drawGraph.pl", "0" };
my_perl = perl_alloc();
perl_construct( my_perl );
perl_parse(my_perl, NULL, 3, embedding, NULL);
perl_run(my_perl);
perl_call_argv("drawGraph", G_DISCARD | G_NOARGS, embedding);
Now this calls the subroutine drawGraph in the file drawGraph.pl ok if
there are no modules being included. However as soon as I include the
line
use GD::Graph::bars;
it crashes. I'm assuming it has something to do with what is described
on this page:
http://www.monster-submit.com/resources/docs/modules/pod/perlembed.html#Using_Perl_modules_which_themse
however I have been unable to implement that solution. After adding
the code thus:
#ifdef __cplusplus
# define EXTERN_C extern "C"
#else
# define EXTERN_C extern
#endif
static void xs_init _((void));
EXTERN_C void boot_DynaLoader _((CV* cv));
EXTERN_C void boot_Socket _((CV* cv));
EXTERN_C void
xs_init()
{
char *file = __FILE__;
/* DynaLoader is a special case */
newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
newXS("Socket::bootstrap", boot_Socket, file);
}
When compiling I get the error:
linkage specification contradicts earlier specification for 'xs_init'
D:\......\PerlThing\PerlThingDlg.cpp(187) : see declaration of
'xs_init'
followed by two:
error C2664: 'Perl_newXS' : cannot convert parameter 3 from 'void
(struct cv *)' to 'void (__cdecl *)(struct interpreter *,struct cv *)'
None of the functions with this name in scope match the target
type
I have been unable to find where to go from here. I don't really
understand what's going on, and I haven't been able to find a resource
that explains this. Is there an easier way around this? Is there
something I should have read up on before posting?
Thanks guys,
Hyde
------------------------------
Date: Tue, 17 May 2005 22:59:19 +0930
From: Mr Hyde <pump_yo_brakes@hotgetridofthisbitmail.com>
Subject: Re: Including modules in embedded perl with VC++
Message-Id: <kasj815s1urup2dbg7i2vljmj58k3of1q3@4ax.com>
I realise that this is probably more a VC++ issue, however I thought
I'd give it a go with you guys anyway, maybe one of you has come
across this before.
------------------------------
Date: Tue, 17 May 2005 15:28:41 +0200
From: Kaare Rasmussen <kr@casalogic.com>
Subject: Re: Start server for test ?
Message-Id: <dkmie.1121$km3.110@news.get2net.dk>
> If you need to run a process in the background, the most basic method
> is to fork and exec it:
Thanks.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 8088
***************************************