Hi Stef,

It's probably that your function is called "main".  That's a 
special name in C.  I get a different error than you do, but 
when I change the function name to "run", the error goes away 
and it works fine.

  -Ken


On Monday, August 12, 2002, at 02:47 PM, Stef Telford wrote:
> Whenever i run my program (a small simple one as i will
> show you below) i always get an 'Out of memory' error.
> Any ideas as to why ? I havent done any C programming
> in a few years, but it should be 'alright' from what I
> can remember :)
>
> danke.
>
> --
> #!/usr/bin/perl
> use Inline C => DATA => LIBS => '-lc';
> &main;
>
> __END__
> __C__
> #include <time.h>
>
> int main()
> {  char *result;
>    time_t *timep;
>
>    result=ctime(timep);
>
>    printf("The result we got is: %s\n",result);
>    return 1;
> }

Reply via email to