Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > problem including perl header files

Reply
Thread Tools

problem including perl header files

 
 
shruti.dabhade@gmail.com
Guest
Posts: n/a
 
      05-15-2006
hiii all

I'm tryin to call a perl script from a C program in following 2 ways-

1.By callin system function.
But there's some problem because the system function is not able to
executeany command...it just returns -1.

2.By using the code given in perldoc perlembed(perl documentation for
embedding perl in C)
the code looks like this-

#include <EXTERN.h> /* from the Perl distribution
*/
#include <perl.h> /* from the Perl distribution
*/

static PerlInterpreter *my_perl; /*** The Perl interpreter
***/

int main(int argc, char **argv, char **env)
{
my_perl = perl_alloc();
perl_construct(my_perl);
perl_parse(my_perl, NULL, argc, argv, (char **)NULL);
perl_run(my_perl);
perl_destruct(my_perl);
perl_free(my_perl);
}

now wat happens is that it gives error tht it does not recognise perl.h
and extern.h
copying them to Turbo C's include folder doesn help cos then it
compiles these files also n gives 26 errors!!it is also unable to
locate the header files tht these files use.
Is there any way for me to specify in Turbo C,two paths to look for wen
searching for header files.
in options>directories>include directories i gave a comma n gave path
for perl header files..but it doesn work!!!

Pleeeease help...m at the end of my ideas now!
Thanx in advance.
shruti

 
Reply With Quote
 
 
 
 
ajs@ajs.com
Guest
Posts: n/a
 
      05-15-2006

wrote:
> hiii all
>
> I'm tryin to call a perl script from a C program in following 2 ways-
>
> 1.By callin system function.
> But there's some problem because the system function is not able to
> executeany command...it just returns -1.


1. Are you using Windows? If so, try running "perl" and the path to the
script as an argument. or if you're not using windows....

2. Did you try specifying the full path to the script?

3. Did you make sur e the script is executable?

 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      05-15-2006
wrote in news:1147687552.707282.302620
@y43g2000cwc.googlegroups.com:

> hiii all


'Hi'

> 1.By callin system function.
> But there's some problem because the system function is not able to
> executeany command...it just returns -1.


Are you sure you are specifying the correct path to the executable?

> now wat happens is that it gives error tht it does not recognise
> perl.h and extern.h


Every compiler has a specific way of specifying additional include
directories on the command line.

> copying them to Turbo C's include folder doesn help cos then it


What does this have to do with trigonometry?

> Is there any way for me to specify in Turbo C,


Look in the documentation for your compiler.

On the other hand, TC is a 16-bit compiler, and I would not assume
things would work smoothly.

Do you have to use such a dinosaur?

Sinan
--
A. Sinan Unur <>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc...uidelines.html

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header files with "header.h" or <header.h> ?? mlt C++ 2 01-31-2009 02:54 PM
problem including perl header files shruti C Programming 2 05-15-2006 08:04 PM
problem including header files in TC shruti C Programming 1 05-15-2006 12:11 PM
UNIX header files to Windows header files anand.ba@gmail.com C Programming 3 05-01-2006 03:57 PM
Header files included in header files John Smith C Programming 18 07-24-2004 04:55 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57