0:2(1): preprocessor error: #version must appear on the first line
You can see the shadow going through the cube which makes the shadow look less realistic. Are these those stencil shadows you were talking about? But it does work.
The shadows are of course projected onto the cube (i.e. a cube is at times a shadow receiver), which seems correct to me.
EDIT: About the shader error you were getting: it should work now with that demo, too.