Shared library and many fixes

The SDL example now works as a product of changing how things were
linked to get the shared library to work.