Fix all compile/linker errors