Changed order of objects and libraries to work correctly on linux.