Can Qt 5 be built by gcc-4.9 brew on Mac OSX?



  • For some reasons, I'm trying to build Qt 5.5 using gcc-4.9 (brew version) on OS X, El Capitan.

    First, I overriden /usr/bin/{gcc|g++|cc|c++} to /usr/local/Cellar/gcc49/4.9.3/bin/g++-4.9.

    I used -platform macx-g++ when I run ./configure. However, it seems that configure and make keep using /Applications/Xcode.app/Contents/Developer/usr/bin/g++, which binds to clang++.

    I enforced QMAKE_CXX variable to point to brew g++. In qtbase/mkspecs/common/g++-base.conf, I'm having the followings:

    	QMAKE_COMPILER      = /usr/local/Cellar/gcc49/4.9.3/bin/gcc-4.9
    
    	QMAKE_CC            = /usr/local/Cellar/gcc49/4.9.3/bin/gcc-4.9
    
    	QMAKE_LINK_C        = $$QMAKE_CC
    	QMAKE_LINK_C_SHLIB  = $$QMAKE_CC
    
    	QMAKE_CXX           = /usr/local/Cellar/gcc49/4.9.3/bin/g++-4.9
    
    	QMAKE_LINK          = $$QMAKE_CXX
    	QMAKE_LINK_SHLIB    = $$QMAKE_CXX
    

    I'm still failing to use brew gcc-4.9 and g++-4.9. What should I do? Is it impossible to use brew's gcc toolchain to build Qt on OS X?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.