Using GSL on Matlab Mex
조회 수: 13 (최근 30일)
이전 댓글 표시
Hi I am trying to run a .cpp code on Matlab which has dependencies on the GSL library. I have as of now done the following steps:
- Installed the latest MinGW complier
- Currently using the latest Matlab 2021
- Downloaded the GSL library from https://www.gnu.org/software/gsl/
- Unzipped the contents of the software package and placed the files in the folder named gsl in the location where i have my .cpp code.
- Added the gsl folder and all subfolders to the path.
However when I use the command "mex Mymexcode.cpp;" , the code stops with the error
"C:\user\myfolder\gsl/gsl_math.h:23:25: fatal error: gsl/gsl_sys.h: No such file or directory
#include <gsl/gsl_sys.h>
compilation terminated.
Could anyone please let me know where i am going wrong??
댓글 수: 0
답변 (1개)
Amogh Bhole
2021년 8월 4일
From my understanding your gsl folder is missing the gsl_sys.h header file. Please find the correct path of gsl_sys.h and update it in the include statement of the header file gsl_math.h or copy this file and paste it on the gsl folder this way you won’t have to update the gsl_math.h header file.
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!