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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:08:45+00:00 2026-06-04T02:08:45+00:00

I have created a new project in XCode (using the template STL C++ library),

  • 0

I have created a new project in XCode (using the template “STL C++ library”), and have made a little test function void hello(); that prints to the console.

It compiles fine, and I am able to export a dylib file.

What I can’t figure out is how to create a project that then links to this file and can call the hello() method.

Any advice would be greatly appreciated.

Alex.

  • 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-04T02:08:46+00:00Added an answer on June 4, 2026 at 2:08 am

    Create another Xcode project, such as an application project. In your example you could create a command-line tool project that uses C++.

    After creating the project add the dylib to the target’s Link Binary with Libraries build phase. In Xcode 4, select the project from the project navigator to open the project editor. Select the target from the target list on the left side of the project editor. Click the Build Phases button at the top of the editor. Click the disclosure triangle next to the Link Binary with Libraries build phase. Click the + button to add your library.

    When you finish adding the dylib to your project, include the header file for your library in your code, and you should be able to call the hello() function. You may also need to add a search path to your library to the Library Search Paths build setting to use your library.

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

Sidebar

Related Questions

I have created a new Xcode project using Storyboards (tab view template). I added
I have just created a new project in VS2010 using the Visual c# >
I have Xcode 4 and I created an application using the Tab Bar template
I have created a new project in Xcode and performed the following to add
I have created a new iPhone project in Xcode 4 and added some files
I created a new cocoa project using the command-line tool template. I need to
I created a project in xcode 4.2 using the feature of storyboard. I have
I am new to iOS, i am using Xcode 4.3.2, and i have created
Hi I have created a new azure project with a worker role and have
For a new project I have created a local folder tree with empty 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.