For some reason i was required to add "-lstdc++" to other linker flags of my project. Otherwise it wouldn't let me compile.