Syntax error: variable is static *and* extern

  • Nick Urbanik

    Nick Urbanik - 2007-01-27

    Dear Andreas and team,

    there is a syntax error in src/include/game/ai.h: there, we have an extern statement, exporting a variable ai_params:
    extern AI_Parameters ai_params;
    whereas in src/game/computer.c, which includes src/include/game/ai.h, we have:
    static AI_Parameters ai_params = { ..... };
    which gcc 4.1.1 correctly picks up as an error, and will not continue.

    The solution is simple:

    remove the line
    extern AI_Parameters ai_params;
    completely from src/include/game/ai.h, since ai_params is not used anywhere else except in these two files. It will then compile with gcc 4.1.1

    • Andreas Umbach

      Andreas Umbach - 2007-01-27

      Thanks for pointing this out. The issue is known though, and the fix has been checked in for over a year - into the subversion repository at berlios.

      The CVS version on sourceforge is hopelessly out of date, it's only updated for 'stable' releases. Since sourceforge has added subversion support only 'recently', I have long ago moved the development tree to the subversion repository at Here's the GLtron project page:

      I just realized that I still list the CVS as authoritative source on, I'm going to update that. Sorry for the hassle...

      • Andreas

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks