Mex file won't compile without -g option

I want to compile a large c file (7000 lines) with the matlab command 'mex'. When I use the following command, the file does compile.
mex -g file.c
However, when I leave out the debug option '-g', the file won't compile and I got a lot of warning messages, but no error message. Even when I solve all warning messages, the file won't compile without the debug option. I do want to leave out this option, as this results in a faster execution of the c file. If I put part of the file in comment, the file compiles again. So I assume this has something to do with the length of the c file? Does anyone know how to solve this problem?
Regards

Answers (1)

7000 lines of code is not large at all. It is highly unlikely that your problems are related to the size of your source code. What specific warnings/errors are you getting? What is in the section of code that you comment out to get things working?

1 Comment

EV
EV on 6 May 2016
Edited: EV on 6 May 2016
Dear James,
Thank you for your answer. I installed a new compiler and now the problem is solved.
Regards

Sign in to comment.

Categories

Asked:

EV
on 3 May 2016

Edited:

EV
on 6 May 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!