Borrar filtros
Borrar filtros

How can I install GLPK MEX fo Windows in MatLab

5 visualizaciones (últimos 30 días)
Valentina Bugueño Olivos
Valentina Bugueño Olivos el 16 de En. de 2022
Editada: Saarthak Gupta el 22 de Dic. de 2023
I've been trying to install GLPKMEX in MatLab.
I was following this instructions but I didn't understand what it means by ' predefined constants' so I didn't change the code.
I ran it as it came but It gives me this error :
In this section of the code :
It seems like this file doesn't exist and I don't know what to do to install it.
** I'm using MatLab 2020a **

Respuestas (1)

Saarthak Gupta
Saarthak Gupta el 22 de Dic. de 2023
Editada: Saarthak Gupta el 22 de Dic. de 2023
Hi Valentina,
I understand you are unable to install GLPKMEX for MATLAB on Windows.
The problem probably stems from the version of MATLAB and/or MSVC that you're utilizing. I recommend installing GLPKMEX using CYGWIN, using this approach:
1. Download the most recent version of CYGWIN from their official site at http://www.cygwin.com
2. Download GNUMEX from http://gnumex.sourceforge.net
3. Install GLPK by running the following commands, which include the argument CFLAGS="-O3 -mno-cygwin" during the make process to prevent creating a library dependent on cygwin1.dll:
```
./configure
make CFLAGS="-O3 -mno-cygwin"
make install
```
4. Launch Matlab and execute gnumex. Create a mexopts.bat file using the 'cygwin-mingw' option for CYGWIN users or 'mingw' for MinGW users.
5. Execute makeglpkmex.m. Ensure you input the accurate path to your GLPK directory, as well as to the GLPK include and library folders if necessary. You also need to specify the path to the mexopts.bat file you created in the previous step.
6. Test the interface using the provided example scripts (glpktest1.m, glpktest2.m, glpksparse.m). All should operate correctly.
Refer to the following documentation for further reference:
Hope this helps!
Best regards,
Saarthak

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by