Re:[Help-glpk] glpkmex installation error

2009-11-11 Thread paolole...@libero.it
Hi,

I suggest you to use visual studio 2008 (c++ compiler) if you want to compile 
your mex file (the Lcc default compiler for matlab doesn't work very well). 
This can be done writing mex -setup on command prompt of matlab. Than you 
have to write n to responde the question:

 mex -setup
Please choose your compiler for building external interface (MEX) files: 

Would you like mex to locate installed compilers [y]/n? n

Select a compiler:
[1] Intel C++ 9.1 (with Microsoft Visual C++ 2005 linker)
[2] Intel Visual Fortran 10.1 (with Microsoft Visual C++ 2005 linker)
[3] Intel Visual Fortran 9.1 (with Microsoft Visual C++ 2005 linker)
[4] Lcc-win32 C 2.4.1
[5] Microsoft Visual C++ 6.0
[6] Microsoft Visual C++ .NET 2003
[7] Microsoft Visual C++ 2005
[8] Microsoft Visual C++ 2005 Express Edition
[9] Microsoft Visual C++ 2008
[10] Microsoft Visual C++ 2008 Express
[11] Open WATCOM C++
[12] Open WATCOM C++ 1.3

[0] None

Compiler: 10

After you can select visual studio as default compiler (you can download for 
free visual studio from its microsoft website).
Moreover you should install the last version of glpk (4.40).

king regards.

Paolo.







 Hi


 I have installed glpk-4.34 for Windows and cant seem to install glpkmex in 
 MATLAB and i keep getting this error:



  makeglpkmex

 GLPKMEX - A Matlab interface for GLPK. Script installer.

 Version 2.2 compatible with GLPK 4.18 (or higher)

 (C) 2001-2007, Nicolo #39; Giorgetti.

  

 Do you want to use graphic installer? Y/N [Y]: y

 GLPK path... C:\Programmi\GnuWin32

 GLPK include files...OK

 GLPK library file...OK

 Do you compile GLPKMEX with CYGWIN? Y/N [Y]: n

 lcc preprocessor error: glpkcc.cpp:27 Could not find include file cfloat

 lcc preprocessor error: glpkcc.cpp:28 Could not find include file csetjmp

 lcc preprocessor error: glpkcc.cpp:29 Could not find include file ctime

 Error glpkcc.cpp: 34  empty declaration

 Error glpkcc.cpp: 34  syntax error; found C expecting `; #39;

 Error glpkcc.cpp: 34  unrecognized declaration

 Error glpkcc.cpp: 34  unrecognized declaration

 lcc preprocessor error: glpkcc.cpp:36 Could not find include file glplib.h

 Error glpkcc.cpp: 36  unrecognized declaration

 Error glpkcc.cpp: 110  syntax error; found `mark #39; expecting `; #39;

 Error glpkcc.cpp: 139  undeclared identifier `clock_t #39;

 Warning glpkcc.cpp: 139  Statement has no effect

 Error glpkcc.cpp: 139  syntax error; found `t_start #39; expecting `; #39;

 Error glpkcc.cpp: 139  undeclared identifier `t_start #39;

 Error glpkcc.cpp: 147  illegal use of type name `glp_prob #39;

 Error glpkcc.cpp: 147  undeclared identifier `lp #39;

 Error glpkcc.cpp: 147  operands of * have illegal types `glp_prob #39; and 
 `int #39;

 Error glpkcc.cpp: 147  operands of = have illegal types `int #39; and 
 `pointer to glp_prob #39;

 Error glpkcc.cpp: 147  lvalue required

 Error glpkcc.cpp: 152  type error in argument 1 to `glp_set_obj_dir #39;; 
 found `int #39; expected `pointer to glp_prob #39;

 Error glpkcc.cpp: 154  type error in argument 1 to `glp_set_obj_dir #39;; 
 found `int #39; expected `pointer to glp_prob #39;

 Error glpkcc.cpp: 160  too many errors

  

   C:\PROGRA~1\MATLAB\R2009A\BIN\MEX.PL: Error: Compile of  #39;glpkcc.cpp 
 #39; failed.

  

 ??? Error using == mex at 218

 Unable to complete successfully.

  

 Error in == makeglpkmex at 111

 eval([ #39;mex  #39; cmd]);






 Please advise...Thank you!




 Rgds

 Giorgia





___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] problem glpk matlab for linux

2009-10-26 Thread paolole...@libero.it
Hi all,
I have tried to compile my glpkmex.cpp file on matlab 2008Ra for linux(ubuntu) 
using gcc. After this step I used the mex file in a matlab routine but routine 
stop its running with this error:

??? Error using == glpkmex
Function mxGetJc_700 is obsolete in file compat32.cpp, line 307.
(64-bit mex files using sparse matrices must be rebuilt with the
-largeArrayDims option.  See the R2006b release notes for more details.)


I have also tried to re-compile the file using the option -largeArrayDims but 
in this way is not possible to complete the compiling because in this case 
appears a new error:


/home/paolo/Documenti/LOB_2/Optimization/Optimization/glpkmex/cppfiles/glpkmex.cpp:
 In function `void mexFunction(int, mxArray**, int, const mxArray**)´:
/home/paolo/Documenti/LOB_2/Optimization/Optimization/glpkmex/cppfiles/glpkmex.cpp:672:
 error: cannot convert `mwIndex*´ to `int*´ in initialization
/home/paolo/Documenti/LOB_2/Optimization/Optimization/glpkmex/cppfiles/glpkmex.cpp:673:
 error: cannot convert `mwIndex*´ to `int*´ in initialization

mex: compile of ' 
/home/paolo/Documenti/LOB_2/Optimization/Optimization/glpkmex/cppfiles/glpkmex.cpp'
 failed.

Is there someone that can help me? The problem is due to the 64bit architecture?

Paolo L.



___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk