Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Compiling Qt5.3 from source on Mac with g++ 4.9
Forum Update on Monday, May 27th 2025

Compiling Qt5.3 from source on Mac with g++ 4.9

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 1.0k 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.
  • S Offline
    S Offline
    soledax
    wrote on 22 Nov 2014, 17:08 last edited by
    #1

    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!

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bsomervi
      wrote on 6 Feb 2015, 22:01 last edited by
      #2

      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.

      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