Question: I try to validate my code, but i get a few error, and i need help with this:

I get a few error for this:

1. **end tag for "param" omitted, but OMITTAG NO was specified**
2. **cannot generate system identifier for general entity "color"**
3. **general entity "color" not defined and no default entity**

4 **reference not terminated by REFC delimiter**

```
>     > <object
>     > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>     > codebase="http://macromedia.com/cabs/swflash.cab#version=6,0,0,0"
>     > id="flaMovie" width="400"
>     > height="235">
>     >             <param name="movie" value="swf/test_movie_purple.swf">
>     >             <param name="FlashVars" value="lan=<?php echo
>     > $_SESSION['lan'];?>&color=<?php echo
>     > $color;?>">
>     >             <param name="quality" value="medium">
>     >             <param name="wmode" value="transparent">
>     >             <embed src="swf/test_movie_purple.swf"
>     > flashvars="lan=<?php echo
>     > $_SESSION['lan'];?>&color=<?php echo
>     > $color;?>" wmode="transparent"
>     > width="400" height="235"
>     > type="application/x-shockwave-flash"></embed></object>

```

Could anyone help me fix this? Im goin' to crazy..

Answer: 
The `extern` storage class for them is almost certainly the cause of the problem you're seeing. If you remove it, the code will probably be fine (at least in this respect).

Edit: I just noticed that you've tagged this as both C and C++. In this respect C and C++ are really quite different (but from the error messages, you're apparently compiling as C++, not C). In C++, you want to remove the `extern`, because (by default) `const` variables have the `static` storage class. That means each source file (translation unit) will get its own "copy" of the variable, and there won't be any conflict between definitions in different files. Since you're (probably) only using the values, not treating them as variables, having multiple "copies" won't hurt anything -- none of them will be allocated storage space.

In C, `extern` is rather different, and removing the `extern` won't make any real difference, because they'll be `extern` by default. In this case, you really need to initialize the variables in exactly one place, and declare them extern in the header. Alternatively, you can add the `static` storage class that C++ will add by default when/if you remove the `extern` from the header.
An old question, indeed, but one useful answer is missing.

It is possible to trick MSVC into accepting static constants in headers simply by wrapping those in a "dummy" class template:

```
template <typename Dummy = int>
struct C {
     static const double Pi;
};

template <typename Dummy = int>
const double C<Dummy>::Pi = 3.14159;

```

Now, C<>::PI can be accessed from elsewhere. No redefinition complains; constant is directly accessible in each compilation units without fancy link time optimization. Macro can be rolled out to further prettify this approach (even though macros are evil).