Re: Is there any way to use C header files in perl program?
- From: Peter@xxxxxxxx (Peter Scott)
- Date: Tue, 20 Feb 2007 06:57:37 -0800
On Tue, 20 Feb 2007 12:19:22 +0530, Dharshana Eswaran wrote:
Hello All,
I need to use a C header file in Perl program in Unix.
Is it possible to use the header files from perl in any way? I do not want
to use any modules for the same.
I do not want to enable the perl program to call a routine in C library
through XS. I just want to use the values rather than any code.
If you were talking about just #define, I'd say
http://search.cpan.org/~gbarr/Include-1.02a/Include.pm
But:
For example, Consider "headerfile.h":
struct sample {
int x;
};
Then in my C program I might do the following:
printf("The size of a headerfile is %d\n",sizeof(headerfile));
Can i do the same in Perl?
I am having a hard time picturing what you might use this for in Perl.
You might look at h2ph, which comes with perl. I also suggest reading
http://xrl.us/uzcs (Link to www.amazon.com).
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
.
- Follow-Ups:
- Re: Is there any way to use C header files in perl program?
- From: Dharshana Eswaran
- Re: Is there any way to use C header files in perl program?
- References:
- Is there any way to use C header files in perl program?
- From: Dharshana Eswaran
- Is there any way to use C header files in perl program?
- Prev by Date: Re: Calling shell-specific commands
- Next by Date: ldap active directory script...
- Previous by thread: Re: Is there any way to use C header files in perl program?
- Next by thread: Re: Is there any way to use C header files in perl program?
- Index(es):
Relevant Pages
|
|