Hi!
You are calling C functions from C++. All C code should be embeddes in
something like:
#ifdef __cplusplus
extern "C" {
#endif
int C = 30;
int H = 30;
int R = 6;
glp_prob *lp;
int ia[1 + C*H*R + C*R], ja[1 + C*H*R + C*R];
double ar[1 + C*H*R + C*R], z;
#ifdef __cplusplus
}
#endif
cout<<"Basic matrices of LP problem are defined"<<"\n";
#ifdef __cplusplus
extern "C" {
#endif
lp = glp_create_prob();
#ifdef __cplusplus
}
#endif
Alternatively you can define C++ wrapper functions and call them
directly from C++.
Jiri
int C = 30;
int H = 30;
int R = 6;
glp_prob *lp;
int ia[1 + C*H*R + C*R], ja[1 + C*H*R + C*R];
double ar[1 + C*H*R + C*R], z;
cout<<"Basic matrices of LP problem are defined"<<"\n";
lp = glp_create_prob();
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk