mex should treat C files as C++
Thomas Weber
thomas.weber.mail at gmail.com
Thu Jan 8 09:25:55 CST 2009
Am Donnerstag, den 08.01.2009, 16:00 +0100 schrieb Søren Hauberg:
> 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.
You can include stdlib.h.
Thomas
More information about the Bug-octave
mailing list