int QSopt_primal (QSprob p, int *status)
int status, rval; /* p is a QSprob, a handle to an existing LP problem */ rval = QSopt_primal (p, &status); if (rval) fprintf (stderr, "QSopt_primal failed with return code %d\n", rval); } else { switch (status) { case QS_LP_OPTIMAL: printf ("Found optimal solution to LP\n"); break; case QS_LP_INFEASIBLE: printf ("No feasible solution exists for the LP\n"); break; case QS_LP_UNBOUNDED: printf ("The LP objective is unbounded\n"); break; default: printf ("LP could not be solved, status = %d\n", status); break; } }