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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:38:09+00:00 2026-05-27T21:38:09+00:00

I have a workspace with a project which links with the static libraries in

  • 0

I have a workspace with a project which links with the static libraries in another project (which is also in the workspace). It’s a problem in Kobold2D I haven’t been able to resolve, even though I understand the cause, and I suppose it’s similar to this question.

The project targets and the static library targets all have the Debug and Release build configurations. All is well.

Now someone adds a new build configuration in the project and names it Ad-Hoc for example. Now the project’s target builds the Ad-Hoc configuration, however the static libraries have no such configuration. Apparently they then default to building the Release configuration.

At the end, when the linker is supposed to bring everything together, it fails:

ld: library not found for -lbox2d-ios
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++ failed with exit code 1

For forcibly loaded libraries via -force_load $(BUILT_PRODUCTS_DIR)/libSomeLib.a the error is similar but says “file not found”. I should note that the library “libbox2d-ios.a” is in the “link binary with libraries” build phase list.

Obviously the problem is that the linker is assuming that the libraries are in the Ad-Hoc-iphoneos folder in the BUILT_PRODUCTS_DIR while they are actually in the Release-iphoneos folder because they have no Ad-Hoc build configuration.

How can I slap the linker in the face and tell him to get the libraries where they are? Preferably I’m looking for a solution that works for both cases, ie libraries added the standard way (link binary with libraries build phase) and libraries that need an additional -force_load to work.

I’m hoping that there’s some way to:

  • force libraries to be placed in the build configuration folder of the app’s target
  • run a post-compile & pre-link script that copies each library to the build configuration folder
  • specify a relative path to the libraries
  • use a different macro other than $BUILT_PRODUCTS_DIR for -force_load
  • a linker flag like -WTFmake-all-problems-go-away

Excuse me, but I have to say this … ARGH! 🙂

  • 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-27T21:38:10+00:00Added an answer on May 27, 2026 at 9:38 pm

    I have not found a way to do this, unfortunately. The best workaround I can find is to add new targets rather than new build configurations. So for example in one of my projects I have only Release and Debug configurations, but I have extra targets called “MyProject – app store” and “MyProject – ad hoc”. This will only be possible if you have control of the project file, of course.

    Having duplicated targets sitting around is annoying in the extreme because you can add files to one target and forget to add them to the others, and you won’t know until you try and build it. But it does build, which is a win (with xcode anyhow).

    A similar question I asked a while ago: What is the correct way to set build configurations in an ios project using static libraries for creating an archive in xcode 4?

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

Sidebar

Related Questions

I have a dll file in the workspace of the project which is under
I have a project which I have copied from my old workspace to a
I have a project which is just HTML/JS/CSS. Here is index.html https://raw.github.com/nsisodiya/2x2-workspace-using-html5/master/index.html When I
I have a directory structure D:\workspace 2\project\lib where I have all the files AgentMain.java(which
In Eclipse, I have a workspace that contains all of my projects. Each project
I have several projects open in an Eclipse workspace. Like so: com.harbl.project.one com.harbl.project.two com.harbl.project.three
I have workspace inside of Eclipse which has 2 projects in it. I want
I have a remote project in Eclipse which was created through RSE's 'Create Remote
I have smallish personal project consisting of the following Eclipse workspace. + +-MyApp //
I have maven-gwt project. It has lots of dependencies which is usual by 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.