Fix gitignore.
Fix a bunch of linker errors.