Linking failed with undefined references to c++ operators, setting linker to c++ compiler should help