I installed a gcc 4.8.0 in the /opt folder. I put in my PATH, so when i do a gcc/g++ -v it returns to me the 4.8.0 version. But when i go to the QT Creator and compile my program with the c++11 code (implemented in 4.3 > ) it don't compile. So i put a -v option in the QMAKE_CXXFLAGS flag. So i get:
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
Then i tried to create another toolchain that points to the new path, it is in Custom, but i cannot use it. How can i force the QT Creator to use another compiler (in my case the GCC, but in another PATH) I want to force so the XCODE dont need to change the compiler too. Is there a way to do that?
In Qt Creator go in
then add a new gcc compiler.
Then go into
and change the compiler in your current kit (usually called "Desktop").
You may need latest versions of Qt Creator with "kits" (available from Qt Creator 2.6).