A question about the use of api (METIS_PartGraphRecursive)

Professor,Thanks for answer my question.
Your METIS is very useful for me,and I want to use it in NS-3 for network.
But I am a newbie,I don't konw how to call the api interface correctlly.
Below is my code,named api.c. I run it in the terminal with gcc -o api api.c /home/mycom/metis-5.1.0/build/Linux-i686/libmetis/libmetis.a -lm
But I always get a "Segmentation fault"
Can you help me ? Thank you !

#include
#include
#include

int main()
{
idx_t a=15;
idx_t b=1;
idx_t c[16]={0,2,5,8,11,13,16,20,24,28,31,33,36,39,42,44};
idx_t d[44]={1,5,0,2,6,1,3,7,2,4,8,3,9,0,6,10,1,5,7,11,2,6,8,12,3,7,9,13,4,8,14,5,11,6,10,12,7,11,13,8,12,14,9,13};
idx_t e=4;
idx_t *nvtxs=&a;
idx_t *ncon=&b;
idx_t *xadj=c;
idx_t *adjncy=d;
idx_t *nparts=&e;
idx_t *objval;
idx_t *part;
METIS_PartGraphRecursive (nvtxs,ncon,xadj,adjncy,NULL,NULL,NULL,nparts,NULL,NULL,NULL,objval,part);
return 0;
}