How can I install GLPK MEX fo Windows in MatLab
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 **
0 commentaires
Réponses (1)
Saarthak Gupta
le 22 Déc 2023
Modifié(e) : Saarthak Gupta
le 22 Déc 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:
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
0 commentaires
Voir également
Catégories
En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!