void *make_matrix(int ndims, int *dims[], size_t elem_size)
"int *dims" not "int *dims[]" obviously...