Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8794017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:11:46+00:00 2026-06-13T23:11:46+00:00

What is the most sensible way to use Mac OS SDKs from a Qt

  • 0

What is the most sensible way to use Mac OS SDKs from a Qt project? You need to have a path to the base SDK (MacOSX10.X.sdk), paths to the headers you need, and to indicate the frameworks you are using.

At the moment I am doing this in my pro file (with help from here; Qt, Qmake and Mac Os X SDKs):

MAC_SDK  = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
if( !exists( $$MAC_SDK) ) {
  error("The selected Mac OSX SDK does not exist at $$MAC_SDK!")
}
QMAKE_MAC_SDK = $$MAC_SDK

INCLUDEPATH += $$QMAKE_MAC_SDK/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers

DEPENDPATH  += $$QMAKE_MAC_SDK/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers

LIBS += -framework CoreFoundation

The SDKs are in the Xcode app bundle, what the hell? I was wondering if there is an environment variable which stores the path to the SDKs. Also, switching SDK versions, I have to go the the MAC_SDK path and change 10.7 to something else, is that the best way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:11:47+00:00Added an answer on June 13, 2026 at 11:11 pm

    Recent versions of Xcode (4.4 onwards I think) now keep everything inside the Xcode bundle itself, instead of say /Developer previously. Miscellaneous tools and apps are a separate download.

    Not aware of any environment variable, outside of using Xcode (and specifically xcodebuild) to query the SDK?

    I’ve used the same approach you have to select and use the SDK in qmake projects. Typically you develop with the most recent SDK which will not change that often. You might want or need to require a minimum version of the OS (=> SDK) and would therefore use the -mmacosx-version-min=10.X compiler option to assert this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Related Using SO as an example, what is the most sensible way to manage
I have a long document in XML from which I need to produce static
For my project, I need to store info about protocols (the data sent (most
I'm looking for the easiest and most sensible way to allow this scenario to
What is the most sensible way to count unique names and the last occurence
What would be the most sensible choice for building a socket server application, assuming
Most of the ASP.NET MVC paging solutions I have found by googling look like
I have a canonical file structure like that (I'm giving sensible names to ease
What's the most simple way to group data over time, by month? In the
I have a JFrame which contains most everything in the application. It has a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.