changed the build script and some linker settings.