On 2/20/07, Peter Scott <[EMAIL PROTECTED]> wrote:
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/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Thank you. I shall check the link and have a knowledge on it. Actually, i just came up with an idea of merging the C header files in Perl. And searched in net, since i could not get a proper solution, i mailed to the list. It was just my idea and not for implementation. Wanted to learn more on that. Anyways, thanks once again. Regards, Dharshana