How can I compile mex file in SPM12 on macos Monterey?
Afficher commentaires plus anciens
I wonder how can I fix the error below.
“Error using file2mat (line 16)
file2mat.c not compiled - see Makefile”
Also when I try to compile the mex, I met the error below.
mex -O -largeArrayDims -c spm_vol_utils.c -DSPM_UNSIGNED_CHAR
make: mex: No such file or directory
make: *** [utils_uchar.mexmaci64.o] Error 1
1 commentaire
Cynthia Son
le 25 Août 2022
Hi, having a similar issue. Were you able to find a fix?
Réponse acceptée
Plus de réponses (2)
Lizhao Du
le 18 Juil 2024
0 votes
First of all, make sure that you can run "mex" in the command line in Matlab.
And then, just navigate to the folder, for example, ~/MatLab_ToolBox/SPM/***, and then run "mex file2mat.c" in the command line.
Warnings may be generated. But it really works.
景川
le 22 Sep 2025
0 votes
Hi, I met the similar Q. I solved it as followings:
1. make sure you could run "mex -setup". 2. if not, please download the Xcode in Appstore, and open it to make the settings (default). 3. if yes, using the Finder to find the file2mat.c. 4. Then paste the path of folders (contains the file2mat.c) in matlab (see below).
5. after located at this folder (contains the file2mat.c), run "mex fild2mat.c".
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!