To whom it may concern. The version 2.11 of GLPKMEX does not compile with GLPK 4.48 on Matlab. The reason is the struct glp_long as reported below:
glpkcc.cpp:374: error: `glp_long #39; was not declared in this scope glpkcc.cpp:374: error: expected `; #39; before "tpeak" glpkcc.cpp:375: error: `tpeak #39; was not declared in this scope The code is: glp_long tpeak; glp_mem_usage(NULL, NULL, NULL, &tpeak); *mem=(double)(4294967296.0 * tpeak.hi + tpeak.lo) / (1024); In fact, I suppose that the declaration of glp_mem_usage is changed from the past and now is: void glp_mem_usage(int *count, int *cpeak, size_t *total, size_t *tpeak); A simple solution for this problem is by changing the code as: size_t tpeak; glp_mem_usage(NULL, NULL, NULL, &tpeak); *mem=(double) tpeak / (1024); I recall that *tpeak is the peak value of *total reached since the initialization of the GLPK library environment and *total is the total amount, in bytes, of currently allocated memory blocks. So, the division by 1024 has the only purpose to convert bytes in kilobytes. I hope it can help someone. Best, Gioker
_______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
