cannot build mex files using MinGW
Mostrar comentarios más antiguos
I have configured MinGW using mex -setup but cannot seem to succesfully build files. I am using Matlab R2018a with Windows 10.
Trying:
mex('-R2018a','-O', 'CFLAGS="\$CFLAGS -fopenmp"', '-O','LDFLAGS="\$LDFLAGS
-fopenmp"',[path,'private/get_from_3D_projection_mex.cpp'], '-output', [path,
'private/get_from_3D_projection_mex'])
and I get an error:
Error using mex
g++: error: \-fexceptions: No such file or directory
Trying this solution did not work for me https://github.com/cjlin1/libsvm/issues/55
mex('-R2018a','-O', 'COMPFLAGS="\$COMPFLAGS -fopenmp"', '-O','LDFLAGS="\$LDFLAGS
-fopenmp"',[path,'private/get_from_3D_projection_mex.cpp'], '-output', [path,
'private/get_from_3D_projection_mex'])
Then I have:
Error using mex
D:\matl\cSAXS_matlab_base_package\+utils\private\get_from_3D_projection_mex.cpp:76:25: fatal error:
sys/sysinfo.h: No such file or directory
#include <sys/sysinfo.h>
Also trying to build it with VS 2015 I get the latter error...
Any ideas? thanks in advance!
2 comentarios
Walter Roberson
el 31 de Mzo. de 2022
I do not know why you have those two \ in the mex call.
Toni Uusimäki
el 31 de Mzo. de 2022
Respuestas (1)
Toni Uusimäki
el 1 de Abr. de 2022
Categorías
Más información sobre MATLAB Support for MinGW-w64 C/C++ Compiler en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!