Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Compiling Qt5.3 from source on Mac with g++ 4.9
soledax 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?
bsomervi 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.