Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make.m problem in win10 & MinGW64 compiler #55

Open
alicanb opened this issue Jan 21, 2016 · 73 comments
Open

make.m problem in win10 & MinGW64 compiler #55

alicanb opened this issue Jan 21, 2016 · 73 comments

Comments

@alicanb
Copy link

alicanb commented Jan 21, 2016

I am on a windows 10 with matlab r2015b and MinGW64. When I run make.m I encountered with gcc: error: \-fexceptions: No such file or directory. I solved it by changing CFLAGS to COMPFLAGS.

@Shuaishi
Copy link

That's really help!!! How you figured this out?

@xiangzhang1015
Copy link

Thanks very much!!
It works.
Thank God, it made me crazy!

@zhaoxin111
Copy link

Thank you very much!!!!!

@sharealll
Copy link

Thank you very very much!
I have solved this problem for five days!

@lei25
Copy link

lei25 commented Nov 21, 2016

Thank you very much!! That really helps!

@outofthink
Copy link

outofthink commented Dec 7, 2016

Is there anyone buid right on win 10 use vs 2015 community?
I do it, and got "math.h no such file or dirctory". I change to makefile.win add include dir in CFLAGS, it's no use.
then I use vs 12, alse add include dir in CFLAGS, got "size_t redefine".
what's wrong?

@ghost
Copy link

ghost commented Jan 12, 2017

Thank you so very much!!!

@aysegulozkaya
Copy link

Thank you, it solved my problem!

@angeloyeo
Copy link

angeloyeo commented Mar 3, 2017

I love this guy.

@jfmoralest
Copy link

Tahnk you very much!. It also worked for me.

@bside89
Copy link

bside89 commented Mar 20, 2017

Zomg thank you so much!!!1 It works now.

@zeaksi
Copy link

zeaksi commented May 27, 2017

Thanks a ton...
God bless.... I spend entire day fixing it out.. but this small modification works like magic...
I wonder how u got this.... thanks again

@casper5300
Copy link

Thank you very much!! Although I've know idea what was happend there after replacing all the CFLAGS with COMPFLAGS. It really worked!!!!

@aiorwoa
Copy link

aiorwoa commented Jun 15, 2017

Thanks!!!

@sourjyasarkar
Copy link

Thank you so much !!! This really worked like magic!

@Ekanki
Copy link

Ekanki commented Sep 5, 2017

make.m is not showing any error anymore but still, it is not adding the library (libsvm) in MATLAB 2014b.

@aalimz
Copy link

aalimz commented Nov 21, 2017

Thanks, that works great!

@ghost
Copy link

ghost commented Nov 27, 2017

Thank you very much! it solves my problem!

@ruthot
Copy link

ruthot commented Dec 10, 2017

Thanks a lot. it took me hours

@ghost
Copy link

ghost commented Dec 24, 2017

Thanks a lot, man...

@HOUYU275
Copy link

HOUYU275 commented Jan 4, 2018

thanks - -

@architkansal
Copy link

Thanks a lot

@pankajnita1
Copy link

i am using matlab R2017a and using libsvm.when i try to run the make.m file "Building with 'MinGW64 Compiler (C)'.
Error: C:\Users\PANKAJ\Desktop\libsvm-3.22\libsvm-3.22\matlab\make.m failed (line 13)
gcc: error: -fexceptions: No such file or directory" error is shown ??compflag solution isn't working.please guide me.

@aalimz
Copy link

aalimz commented Jan 16, 2018

Just open the Make.m file and find all "CFLAGS". Then replace them with "COMPFLAGS" and run the file. Hope it works for you.

@lihp11
Copy link

lihp11 commented Jan 17, 2018

really help me !!

@mrin9san
Copy link

mrin9san commented Mar 2, 2018

God bless u !!

@SuninKingdom
Copy link

It works! Thanks!! Please take my knee, wa-ha-ha!

@v4-hub
Copy link

v4-hub commented Apr 23, 2018

It works! Thanks!!

@jinjiaodawang
Copy link

It works. You saved me : )

@vannguyenthanh
Copy link

Yes, I see.
However, maybe I need to change something to make it suitable for my data, so I need a recompile to mex file. Can I use "mex -O -largeArrayDims...." instead?

Thank you

@apolloaggrey
Copy link

thanks a lot !...

@shafi007
Copy link

Hi, thanks a lot. That worked <3

@Sweetmeng
Copy link

感谢感谢!

@Roozbeh-Sdtz
Copy link

thanks a lot :)

@Yunnglin
Copy link

Yunnglin commented Oct 5, 2019

OMG, I forgot to restart matlab!!! That worked!!!
--Matlab R2019 a

@purushpsm147
Copy link

I am on a windows 10 with matlab r2015b and MinGW64. When I run make.m I encountered with gcc: error: \-fexceptions: No such file or directory. I solved it by changing CFLAGS to COMPFLAGS.

Thank you so much...

@rajibrj43
Copy link

Thanks. It's working. I spent around 5 hours.

@qiqiang01
Copy link

close

1 similar comment
@qiqiang01
Copy link

close

@evidri
Copy link

evidri commented Oct 29, 2019

Thank you !!!

@Mahathi
Copy link

Mahathi commented Nov 17, 2019

Thanks! That helped a lot!

@xxyypp
Copy link

xxyypp commented Nov 22, 2019

Thanks! That's really helpful!!!

@Kwunbun
Copy link

Kwunbun commented Mar 13, 2020

I am on a windows 10 with matlab r2015b and MinGW64. When I run make.m I encountered with gcc: error: \-fexceptions: No such file or directory. I solved it by changing CFLAGS to COMPFLAGS.

Please note that the 'CFLAGS' is in the scripts. You need to replace all 'CFLAGS ' with 'COMPFLAGS'. Remember it is all.

@zjph602xtc
Copy link

Thank you!

@ZhuShaw-han
Copy link

That's amazing! Thanks a lot!

@parthdevbundela
Copy link

tHANKS, BRO IT WORKED

@marvelous-dog
Copy link

niubi........

@xczhang123
Copy link

Thanks legend!!!! It really saves my life!

@zhanglithium
Copy link

thank you so much!!!

@bhawnajyoti
Copy link

thanx a lot... i spent too much time to solve this issue... but you solved it. big thanx

@b20163100
Copy link

Thank you vey much

@will945945945
Copy link
Contributor

In matlab/make.m, please replace line 13~17
"""
mex CFLAGS="$CFLAGS -std=c99" -largeArrayDims libsvmread.c
mex CFLAGS="$CFLAGS -std=c99" -largeArrayDims libsvmwrite.c
mex CFLAGS="$CFLAGS -std=c99" -I.. -largeArrayDims svmtrain.c ../svm.cpp svm_model_matlab.c
mex CFLAGS="$CFLAGS -std=c99" -I.. -largeArrayDims svmpredict.c ../svm.cpp svm_model_matlab.c
"""
with
"""
mex -largeArrayDims libsvmread.c
mex -largeArrayDims libsvmwrite.c
mex -I.. -largeArrayDims svmtrain.c ../svm.cpp svm_model_matlab.c
mex -I.. -largeArrayDims svmpredict.c ../svm.cpp svm_model_matlab.c
""".
We have tested it in both MinGW64 and Visual Studio 2019 compilers in MATLAB, and ``-std=c99'' is no longer needed.

The aforementioned part will be updated in the future.
Thank you.

@Yao-Yiru
Copy link

Really useful !!!

@105305021paul
Copy link

Hi guys, I read the introduction above, and I can’t find the word "CFLAGS" in my make.m file. Please tell me how to solve this problem, thank you

By the way, my matlab version is R2019a and I use libsvm-3.25
my make file

@cjlin1
Copy link
Owner

cjlin1 commented May 14, 2021 via email

@105305021paul
Copy link

105305021paul commented May 16, 2021 via email

@cjlin1
Copy link
Owner

cjlin1 commented May 16, 2021 via email

@105305021paul
Copy link

105305021paul commented May 17, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.