How can I install GLPK MEX fo Windows in MatLab
조회 수: 10 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Saarthak Gupta
2023년 12월 22일
편집: Saarthak Gupta
2023년 12월 22일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!