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 8285617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:30:57+00:00 2026-06-08T11:30:57+00:00

As a follow up to another question I recently asked, I realize my issue

  • 0

As a follow up to another question I recently asked, I realize my issue is that I don’t know how to include Apple ‘frameworks’ in the Eclipse CDT project properties so that they’re picked up and linked at compile time.

This results in includes in this form not to be resolved:

#include <OpenCL/cl.h>

Where the actual path would be something like:

/System/Library/Frameworks/OpenCL.framework/Versions/A/Headers

And the cmd line option would be (if I was manually compiling):

-framework OpenCL

In summary: How can I get Eclipse to see the framework(s) I want fromt he project properties?

Any help highly appreciated!

  • 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-08T11:30:58+00:00Added an answer on June 8, 2026 at 11:30 am

    An alternative answer to JohnIdol’s answer. In particular, an approach that can work in the case that you don’t want to change the <OpenCL/cl.h> reference to <cl.h>

    First, I came to the site with exactly this question in mind (how to include Apple ‘frameworks’ in Eclipse CDT (C/C++) projects) and I really appreciate the discussion – it gave me a starting point.

    John’s answer is cool but it does involve changing how the include file is called (e.g., <OpenCL/cl.h> becomes <cl.h> in the code). Then he does a direct include-path reference in the eclipse properties for each Header directory he needs.

    In my case, I had checked-out GNU Backgammon to play around with the source code. This code compiles (with some mods to LDFLAGS and CPPFLAGS before doing the autogen.sh) on the OS X CLI environment using the I-guess-standard apple approach of the -framework option and with include files references like
    #include <CoreAudio/CoreAudioTypes.h>

    I may never actually commit anything but I didn’t want to start hacking the #includes in code that is already compiling just fine using the standard approach. So I did the following:

    1. Made a new directory in my workspace gnubg called “Frameworks”.
    2. Inside that directory, make soft-links to the header directories.

      ln -s /System/Library/Frameworks/CoreAudio.framework/Headers CoreAudio
      
    3. In the gnubg project properties > C/C++ General> Paths and Symbols, added /gnubg/Frameworks to the Include directories (as a workspace path). I only had to do this once, regardless of the number of soft links I made.

    This way I did not have to change the code at all, Eclipse was happy, CLI compilation was happy as well.

    I note that there is a slight wrinkle if using some directories in Frameworks such as the CoreServices.framework. In those cases there is a Frameworks subdirectory and relative path references in some of the include files (e.g., ..) to other include files. So in this case I had to modify the procedure a bit. Basically, I had to add an additional sub-directory in Frameworks for CoreServices.framework and then in that directory I had to add two soft links. One for the CoreServices (for the Headers) and one for Framework subdirectory.

    lrwxr-xr-x  1 dhansen  staff    57B Jul 27 02:06 CoreServices -> /System/Library/Frameworks/CoreServices.framework/Headers
    lrwxr-xr-x  1 dhansen  staff    60B Jul 27 02:05 Frameworks -> /System/Library/Frameworks/CoreServices.framework/Frameworks
    

    Then I had to add /gnubg/Frameworks/CoreServices.framework to the include path (step 3 above).
    And that’s it. No more include file problems.

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

Sidebar

Related Questions

This is a follow-up to another question I asked earlier today. I am creating
This is a more specific question to follow up on [another question that I
OK, so this is leading on from another question I asked here recently. Basically,
This is a follow up of another question I asked last night. My problem
Another poster asked about preferred syntax for infinite loops . A follow-up question: Why
as a follow up to another question here: i've build a custom contextmenu item
This is a follow up to another question of mine. The solution I found
Follow up to this question for Facebook Friends.getAppUsers using Graph API that pulls friends
A follow-up question to my answer about editing GitHub pull-requests asked whether editing the
I recently asked a question (and had it answered) here: jQuery Load JSON I

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.