Menu

#30 c++11 no typeof, compilation fails

v1.0_(example)
closed
nobody
c++11 (1)
1
2015-07-15
2015-03-06
Anonymous
No

C++11 doesn't have the typeof keyword, so compilation fails.

The quick fix is to
#define typeof typeof;
before include mgl.h

Then it will compile with, e.g., clang-3.5.

Discussion

  • Anonymous

    Anonymous - 2015-03-06
    Post awaiting moderation.
  • Anonymous

    Anonymous - 2015-03-06
    Post awaiting moderation.
  • Alexey Balakin

    Alexey Balakin - 2015-03-07

    This is not the bug. MathGL just use the settings which was specified/found at configuration stage. You just need to specify -std=c++11 at cmake compiler flag to force strict compatibility with C++11, i.e. disable gnu extension(s).

     
  • Alexey Balakin

    Alexey Balakin - 2015-03-07
    • status: open --> closed
     
  • Anonymous

    Anonymous - 2015-07-15
    Post awaiting moderation.

Anonymous
Anonymous

Add attachments
Cancel