Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can Qt 5 be built by gcc-4.9 brew on Mac OSX?

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 586 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xalloc
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved