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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:55:35+00:00 2026-05-26T09:55:35+00:00

We have a Windows application written in C++, part of which we are trying

  • 0

We have a Windows application written in C++, part of which we are trying to port to Mac OS X. Our goal is to wrap the business logic into some libraries and build a Cocoa layer on top for the controller and the GUI. We will probably have several smaller apps using the same libraries so our first thought was to use dynamic libraries for the C++ code (unless there is a better way).
However, we are having some problems with achieving this. Our dynamic library complies fine (at least it looks like that) and we get a .dylib file which we link to in our app. The problem is that our app simply can’t find any of the .h files we are trying to include.
We have already checked that the .h files are being exported as well as checked the install name and made sure that the library is located in the correct directory. Also, we have followed Apple’s guide for creating and using dynamic libraries and found no special step we were missing.

My question here is in two parts:

  1. Is there some obvious step we might be missing which is instrumental in exposing the interface (i.e. the .h files) that we should try before anything else?
  2. We do suspect that the fault might be in the crappy C++ code we have inherited in this project. For instance, there is a lot of logic (implementation of methods) written directly in .h files and in some cases there isn’t even a corresponding .cpp file at all. So the .h files aren’t merely a description of the interface. This might not be the (solemn) problem as our app can’t even find the .h files from the library and they should at be least present.
    We really hope that we can avoid rewriting a lot of the code since the code base which needs to be ported is really large and (as usual) the deadline is close.

PS: We have so far only been working in Xcode 4.2 and have not tried with the command line tools yet.

  • 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-05-26T09:55:36+00:00Added an answer on May 26, 2026 at 9:55 am

    Option 1

    In this case, I would just add the directory containing the headers to the discovery paths for headers or libraries in Xcode. Depending on the layout, some approaches will be better than others.

    Generally, you’ll use some combination of:

    • HEADER_SEARCH_PATHS
    • LIBRARY_SEARCH_PATHS
    • USER_HEADER_SEARCH_PATHS
    • or FRAMEWORK_SEARCH_PATHS

    Which one is correct depends on the library you are using (e.g. these options can also affect the linker). When defining the discovery paths, you can add the suffix ** to denote a recursive search.

    This is ideal because you will have fewer troubles keeping your xc projects in sync with their vs solutions.

    Option 2

    Some people really like some drag and drop support for their includes… I don’t, but this is the approach if there is so much disorganization that you can’t just do something as simple as add a search path:

    • add the headers you need to the project
    • add those headers to the copy headers build phase of the target
    • repeat until it builds and be prepared for breakage when you merge/pull their updates.

    that gets messy quickly, and takes hours to reconstruct when you want to reuse the library if there are collisions in header names.

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

Sidebar

Related Questions

i have an windows mobile application written in c# compact framework which use barcode
We have a business application written for Windows mobile. It has people doing inventories.
I have an windows application written in WPF and WF which also interacts with
I have a windows application written in VB.net. After finishing it I'll setup the
We have a Windows desktop application written in Delphi that works fine on Windows
Assume i have a custom Windows application written in C#. This application has only
I'm creating a Windows Console application written in VB.NET and I have a few
I have written a C# Windows Forms application, not a service (it is only
I have written a small .net Windows Forms application. And now I decided to
I have written a basic Application for windows mobile 5. It is using visual

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.