mex should treat C files as C++

Søren Hauberg soren at hauberg.org
Thu Jan 8 09:00:47 CST 2009


tor, 08 01 2009 kl. 05:54 -0800, skrev dbateman:
> true and false are not valid C keywords. Adding
> 
> #define true 1
> #define false 0
> 
> somewhere, but keep compiling the code with gcc would be a cleaner solution.

Okay, so I tried compiling the offending code in Matlab, and it breaks
there as well. I've been struck by this problem with many peoples mex
code so I thought Matlab did something weird like always compiling with
a C++ compiler, but it turns out they don't. I guess Visual Studio
allows this behaviour which just makes people sloppy.

Anyway, sorry about the noise...

Søren



More information about the Bug-octave mailing list