What CPLEX version are you using and how exactly are you calling baropt in the callable library application. I ran this code
#include <stdio.h>
#include <stdlib.h>
#include <ilcplex/cplexx.h>
#define CPXFUNC(f) do { \
int const s_ = f; \
if ( s_ != 0 ) { \
fprintf (stderr, "%s:%d: %s = %d\n", \
__FILE__, __LINE__, #f, s_); \
fflush (stderr); \
abort (); \
} \
} while (0)
#define CPXPOINTER(f) do { \
void *p_ = (void *)(f); \
if ( p_ == NULL ) { \
fprintf (stderr, "%s:%d: %s = NULL\n", \
__FILE__, __LINE__, #f); \
fflush (stderr); \
abort (); \
} \
} while (0)
int
main(int argc, char **argv)
{
int a;
for (a = 1; a < argc; ++a) {
char const *model = argv[a];
CPXENVptr env;
CPXLPptr lp;
int status;
double objval;
CPXPOINTER( env = CPXXopenCPLEX(&status) ); CPXFUNC( status );
CPXFUNC( CPXXsetintparam(env, CPX_PARAM_SCRIND, CPX_ON) );
CPXPOINTER( lp = CPXXcreateprob(env, &status, "") ); CPXFUNC( status );
CPXFUNC( CPXXreadcopyprob(env, lp, model, NULL) );
CPXFUNC( CPXXbaropt(env, lp) );
printf("Status: %d\n", CPXXgetstat(env, lp));
CPXFUNC( CPXXgetobjval(env, lp, &objval) );
printf("Objective: %.8f\n", objval);
CPXFUNC( CPXXfreeprob(env, &lp) );
CPXFUNC( CPXXcloseCPLEX(&env) );
}
return 0;
}
and as expected it outputs
Status: 1
Objective: 84.85599973
#CPLEXOptimizers#DecisionOptimization