Compiling Qt5.3 from source on Mac with g++ 4.9
-
wrote on 22 Nov 2014, 17:08 last edited by
I've got code that relies on features in g++ 4.8 and would like to statically link. So, I need to compile Qt from source with the same compiler I use to compile the rest of my code.
Using Homebrew, I installed g++ 4.9 and created a symlink so that g++ maps to g++-4.9 instead of the normal llvmgcc42.
However, when I go to configure the Qt build, I'm unsure what -platform argument to use. It appears that the macx specific .conf files are made for llvmgcc42 (see in common/g++-macx.conf there is the line "QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvmgcc42").
Any recommendations for how can I build from source with g++4.9 on Mac 10.9?
Thanks!
-
wrote on 6 Feb 2015, 22:01 last edited by
I am also looking for a similar answer. In my case I need to include some Fortran code that uses OpenMP into a Qt5 application. The problem I have is that I need to use C/C++ compilers that support OpenMP to get a valid application. That means I need to compile Qt from source with gcc (not gcc-llvm). I want to use the MacPorts gcc/g++/gfortran 4.9 as we use gcc-4.9 on other platforms.
Unless I can achieve this Qt build I am stuck because I will end up with conflicting C++ support and Standard Library dylibs which is not acceptable.
TIA
Bill.