cannot build mex files using MinGW
Show older comments
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 Comments
Walter Roberson
on 31 Mar 2022
I do not know why you have those two \ in the mex call.
Toni Uusimäki
on 31 Mar 2022
Answers (1)
Toni Uusimäki
on 1 Apr 2022
Categories
Find more on MATLAB Support for MinGW-w64 C/C++ Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!