Segmentation fault


I am using hMetis 1.5 linux version to do recursive bisection for circuits. I linked my program to the library and called hMetis as a function, but it always return segmentation fault to me. Originally I try to pass STL vector to hMetis by expressions like "&eind[0]", which may be the cause of problem. But I also tried to set the parameters as the following( like the example provided in the manual ):

int eptr[5] = {0,2,6,9,12};
int eind[12] = {0,2,0,1,3,4,3,4,6,2,5,6};
int ewgts[4] = {1,1,1,1};
int part[7] = {-1,-1,-1,-1,-1,-1,-1};
int vwgts[7] = {1,1,1,1,1,1,1};
int options[9] = {0,0,0,0,0,0,0,0,0};
int edgecut = 0;

And I called hmetis like this:


Again, still segmentation fault.
There must be something I did wrong but I haven't realized, can anyone help me out? Thanks!