Bill Allombert on Mon, 03 Dec 2012 22:52:52 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: bug in PARI/GP (Segmentation Fault)


On Mon, Dec 03, 2012 at 08:59:54PM +0000, Ruhma Tahir wrote:
> Hi,
> 
> I get the following error at run time when i run my C code which uses pari
> library:-

> The C code returned by gp2c is following:-
...
> int main(void)
> {
> printf("Hello\n");
> pari_init(1000000,2);
> GEN A;
>  func(A);
> pari_close();
> return 0;
> }

Well you added the main() function, didn't you ?

I compiled your C program and it works fine.
$ ./hnf
Hello
[9, -36, 30; -36, 192, -180; 30, -180, 180]
[6, 0, 3; 0, 12, 0; 0, 0, 30]

How did you compile your program ?
Maybe run it under the debugger (gdb).

Cheers,
Bill