<div dir="ltr"><div><div><div><br>Hello Duke,<br><br></div>Let me rephrase my question.<br><br></div>For example, I write a simple perl file, <a href="http://hello.pl">hello.pl</a> : <br></div><div>#!/usr/bin/perl<br></div>

<div>print "Hello World"<br></div><div><br>To compile this, I use :  parrot perl6.pbc <a href="http://hello.pl">hello.pl</a><br><br></div><div>The output is : Hello World<br><br></div><div>Similarly, if I have a C file, hello.c :<br>

<br></div><div>#include<stdio.h><br><br></div><div>int main()<br>{<br></div><div>    printf("Hello World\n");<br></div><div>    return 0;<br></div><div>}<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">

How would I compile this to get the output?<br><br></div><div class="gmail_extra">Note : I downloaded the c99 package for parrot from github but I could not get this installed.<br></div><div class="gmail_extra"><br clear="all">

<div>Thanks & Regards,<i><br>Ashraya S Shiva</i><br></div>
<br><br><div class="gmail_quote">On Tue, Jul 23, 2013 at 7:23 PM, Jonathan "Duke" Leto <span dir="ltr"><<a href="mailto:jonathan@leto.net" target="_blank">jonathan@leto.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Howdy Ashraya,<br>
<br>
I believe nobody is answering you because they don't quite understand<br>
what you mean.<br>
<br>
Could you ask your question another way, and give some more background<br>
about what you are trying to do?<br>
<span class="HOEnZb"><font color="#888888"><br>
Duke<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Sun, Jul 21, 2013 at 10:51 PM, Ashraya <<a href="mailto:theemeraldsoul@gmail.com">theemeraldsoul@gmail.com</a>> wrote:<br>
> A gentle reminder.. Please reply. How to convert a C code into PIR code ?<br>
><br>
> Thanks & Regards,<br>
> Ashraya S Shiva<br>
><br>
><br>
> On Wed, Jul 17, 2013 at 4:30 PM, Ashraya <<a href="mailto:theemeraldsoul@gmail.com">theemeraldsoul@gmail.com</a>> wrote:<br>
>><br>
>> Hello Duke,<br>
>><br>
>> I am trying one of the examples in the .pod you have given :<br>
>><br>
>>   /* foo.c */<br>
>><br>
>>   /* specify the function prototype */<br>
>>   #ifdef __WIN32<br>
>>   __declspec(dllexport) void foo(void);<br>
>>   #else<br>
>>   void foo(void);<br>
>>   #endif<br>
>><br>
>>   void foo(void) {<br>
>>     printf("Hello Parrot!\n");<br>
>>   }<br>
>><br>
>> Then, after having compiled the file as a shared library, the PIR code<br>
>> looks like this:<br>
>><br>
>><br>
>> Here, how do I compile the .c file to produce a .pir file ??<br>
>><br>
>> Thanks,<br>
>> Ashiva<br>
>><br>
>> Thanks & Regards,<br>
>> Ashraya S Shiva<br>
>><br>
>><br>
>> On Wed, Jul 17, 2013 at 2:08 AM, Jonathan "Duke" Leto <<a href="mailto:jonathan@leto.net">jonathan@leto.net</a>><br>
>> wrote:<br>
>>><br>
>>> Howdy,<br>
>>><br>
>>> You can embed Parrot inside of a C or C++ application. It can be any<br>
>>> language, actually (it works with FORTRAN), but we have the best docs<br>
>>> for C and C++. I have embedded Parrot inside of PostgreSQL (PL/Parrot<br>
>>> [0]), but that uses the old interface [1]. The new interface [2] is<br>
>>> infinitely better, but has not been heavily used. But it was designed<br>
>>> very well by Whiteknight, so it is high quality.<br>
>>><br>
>>> You can also call out to C/C++ libraries from parrot via "dlopen" and<br>
>>> cousins via the Native Call Interface (NCI) substem of Parrot [3].<br>
>>><br>
>>> Which of those things do you want to do, or possibly both?<br>
>>><br>
>>> Duke<br>
>>><br>
>>> [0] <a href="http://pl.parrot.org" target="_blank">http://pl.parrot.org</a><br>
>>> [1] <a href="https://github.com/parrot/parrot/blob/master/docs/embed.pod" target="_blank">https://github.com/parrot/parrot/blob/master/docs/embed.pod</a><br>
>>> [2] <a href="https://github.com/parrot/parrot/blob/master/docs/embed_new.pod" target="_blank">https://github.com/parrot/parrot/blob/master/docs/embed_new.pod</a><br>
>>> [3]<br>
>>> <a href="https://github.com/parrot/parrot/blob/master/docs/pdds/draft/pdd16_native_call.pod" target="_blank">https://github.com/parrot/parrot/blob/master/docs/pdds/draft/pdd16_native_call.pod</a><br>
>>><br>
>>><br>
>>> On Tue, Jul 16, 2013 at 4:58 AM, Ashraya S <<a href="mailto:theemeraldsoul@gmail.com">theemeraldsoul@gmail.com</a>><br>
>>> wrote:<br>
>>> > Hello All,<br>
>>> ><br>
>>> > I switched to my favorite Ubuntu and parrot got installed like a charm.<br>
>>> ><br>
>>> > However, I would like to know how parrot supports C program<br>
>>> > compilation.<br>
>>> > Is there any tutorial I can find ? I did not get much support for C in<br>
>>> > google. Got loads for perl and pasm.<br>
>>> ><br>
>>> > Please advise.<br>
>>> ><br>
>>> > Thanks,<br>
>>> > Ashiva<br>
>>> ><br>
>>> ><br>
>>> > On Wednesday, July 10, 2013 7:30:29 PM UTC+5:30, Coke wrote:<br>
>>> >><br>
>>> >> Do you have a C compiler installed?<br>
>>> >><br>
>>> >><br>
>>> >> On Wed, Jul 10, 2013 at 6:39 AM, Ashraya S <<a href="mailto:theemer...@gmail.com">theemer...@gmail.com</a>><br>
>>> >> wrote:<br>
>>> >>><br>
>>> >>> Hi All,<br>
>>> >>><br>
>>> >>> I am new to parrot and i am trying to install this in windows 7.<br>
>>> >>> I have installed perl and minGW and have added these to my PATH as<br>
>>> >>> well.<br>
>>> >>><br>
>>> >>> But i get the following error :<br>
>>> >>><br>
>>> >>> C:\Users\ashiva\Documents\GitHub\parrot>perl Configure.pl<br>
>>> >>> Parrot Version 5.5.0 Configure 2.0<br>
>>> >>> Copyright (C) 2001-2013, Parrot Foundation.<br>
>>> >>><br>
>>> >>> Hello, I'm Configure. My job is to poke and prod your system to<br>
>>> >>> figure<br>
>>> >>> out<br>
>>> >>> how to build Parrot. The process is completely automated, unless you<br>
>>> >>> passed in<br>
>>> >>> the `--ask' flag on the command line, in which case I'll prompt you<br>
>>> >>> for a<br>
>>> >>> few<br>
>>> >>> pieces of info.<br>
>>> >>><br>
>>> >>> Since you're running this program, you obviously have Perl 5--I'll be<br>
>>> >>> pulling<br>
>>> >>> some defaults from its configuration.<br>
>>> >>><br>
>>> >>> init::manifest -      Check<br>
>>> >>> MANIFEST.....................................done.<br>
>>> >>> init::defaults -      Set Configure's default<br>
>>> >>> values.....................done.<br>
>>> >>> init::install -       Set up installation<br>
>>> >>> paths..........................done.<br>
>>> >>> init::hints -         Load platform and local hints<br>
>>> >>> files................done.<br>
>>> >>> inter::progs -        Determine what C compiler and linker to<br>
>>> >>> use...Compilation<br>
>>> >>> failed with 'gcc'<br>
>>> >>><br>
>>> >>> C:\Users\ashiva\Documents\GitHub\parrot><br>
>>> >>><br>
>>> >>> Please help me resolve this problem.<br>
>>> >>><br>
>>> >>> Thanks a lot, in advance.<br>
>>> >>><br>
>>> >>> --<br>
>>> >>> Ashiva<br>
>>> >>><br>
>>> >>> _______________________________________________<br>
>>> >>> <a href="http://lists.parrot.org/mailman/listinfo/parrot-dev" target="_blank">http://lists.parrot.org/mailman/listinfo/parrot-dev</a><br>
>>> >>><br>
>>> >><br>
>>> >><br>
>>> >><br>
>>> >> --<br>
>>> >> Will "Coke" Coleda<br>
>>> ><br>
>>> ><br>
>>> > _______________________________________________<br>
>>> > <a href="http://lists.parrot.org/mailman/listinfo/parrot-dev" target="_blank">http://lists.parrot.org/mailman/listinfo/parrot-dev</a><br>
>>> ><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Jonathan "Duke" Leto <<a href="mailto:jonathan@leto.net">jonathan@leto.net</a>><br>
>>> Leto Labs LLC <a href="http://letolabs.com" target="_blank">http://letolabs.com</a><br>
>>> 209.691.DUKE <a href="http://duke.leto.net" target="_blank">http://duke.leto.net</a><br>
>>> @dukeleto<br>
>><br>
>><br>
><br>
<br>
<br>
<br>
--<br>
Jonathan "Duke" Leto <<a href="mailto:jonathan@leto.net">jonathan@leto.net</a>><br>
Leto Labs LLC <a href="http://letolabs.com" target="_blank">http://letolabs.com</a><br>
209.691.DUKE <a href="http://duke.leto.net" target="_blank">http://duke.leto.net</a><br>
@dukeleto<br>
</div></div></blockquote></div><br></div></div>