Visual C++ Error C2143: syntax error : missing ';' before 'constant'
While the error is identical to what [others][1] have experienced, my surroundings are completely different. I actually do try to declare a constant:

    const long CS_DROPSHADOW = 0x20000;
    const long WS_EX_LAYERED = 0x80000;

The error is reported for the two constant names.

The constants declaration is located in a Header file, outside any class declaration.

Here is how the H file looks like:

    #ifndef _ASD_SMARTWINDOW_MAIN_H_TAGXXXMAIH_
    #define _ASD_SMARTWINDOW_MAIN_H_TAGXXXMAIH_

    #include "ASDTail.h" //Queue support.

    namespace ASDSmartWindowMaster
    {
    ...
    };

    class ASDSmartWindowListener
    {
    };

    const long CS_DROPSHADOW = 0x20000;
    const long WS_EX_LAYERED = 0x80000;

    //Now comes a bunch of enums...
    enum KLayeredWindowType
    { ... }


    class ASDSmartWindow
    {
    };

    #endif

  [1]: http://stackoverflow.com/questions/5554070/error-c2143-syntax-error-missing-before-constant
Visual C++ Error C2143: syntax error : missing ';' before 'constant'
===

While the error is identical to what [others][1] have experienced, my surroundings are completely different. I actually do try to declare a constant:

    const long CS_DROPSHADOW = 0x20000;
    const long WS_EX_LAYERED = 0x80000;

The error is reported for the two constant names.

The constants declaration is located in a Header file, outside any class declaration.

Here is how the H file looks like:

    #ifndef _ASD_SMARTWINDOW_MAIN_H_TAGXXXMAIH_
    #define _ASD_SMARTWINDOW_MAIN_H_TAGXXXMAIH_

    #include "ASDTail.h" //Queue support.

    namespace ASDSmartWindowMaster
    {
    ...
    };

    class ASDSmartWindowListener
    {
    };

    const long CS_DROPSHADOW = 0x20000;
    const long WS_EX_LAYERED = 0x80000;

    //Now comes a bunch of enums...
    enum KLayeredWindowType
    { ... }


    class ASDSmartWindow
    {
    };

    #endif

  [1]: http://stackoverflow.com/questions/5554070/error-c2143-syntax-error-missing-before-constant