I was using the QT Creator with an old GCC, now i updated to the 4.8 version. But the QT Creator adds a -Xarch_x86_64 option, the GCC 4.8 tells me
g++: error
I had the same problem using GCC installed via MacPorts (tested several versions up to gcc5). The solution for me was using g++
supplied with the XCode command line tools. I uninstalled all MacPorts GCC versions. Below version details of the g++
command that worked.
$ g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix