perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From open sourcer <open.opensour...@gmail.com>
Subject Calling c functions from perl w/o using c wrappers
Date Thu, 10 Feb 2005 06:22:19 GMT
hi

I have a embedded perl into a c class file,

assume 

emb_perl.c

/*-------------------- ****-------------------------  */
 #include <EXTERN.h>
 #include <perl.h>

class <class_name>
{

code ..
}

int function_name
 {

code
 }

/*--------------- end ---------------*/
this hole thing is build into exe <emb_perl.exe>, remember now
emb_perl is exe no source is available.

now i want to use <function_name> in my pl files

sample.pl
------------------------
#!/usr/bin/perl -w

$get_data = function_name (1,2);
print $get_data;

say 
c:\emb_perl sample.pl


thanks
opensourcer

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message