PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell's methods with Modernization and Amelioration, P for Powell.
Move options to prima_options struct, that gets initialized to default values so we only need to set those different than defaults, we can see the actual c call takes much fewer args:
prima_options options;
prima_init_options(&options);
options.iprint = PRIMA_MSG_EXIT;
options.rhoend= 1e-3;
options.maxfun = 200*n;
int nf = 0;
const int rc = prima_uobyqa(&fun, n, x, &f, &nf, &options);
Move options to prima_options struct, that gets initialized to default values so we only need to set those different than defaults, we can see the actual c call takes much fewer args: