fixed wrong linker usage + fix some compiler warnings