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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:03:10+00:00 2026-05-23T11:03:10+00:00

I have built a static library for iOS. My problem is that I use

  • 0

I have built a static library for iOS. My problem is that I use ASIHTTPRequest as an example in my library, and when I add my library to an app that already uses the ASIHTTPRequest library, I get compiler errors, until I remove all ASIHTTPRequest .m files from the project that uses my library.

Is there a way around this ? Like for example build the static library and make it require the ASIHTTP libraries instead of them being added to the project ?

EDIT :

Here is an example of the error I get once I “archive” the project.

ld: duplicate symbol _main in /Users/tj/Library/Developer/Xcode/DerivedData/db-afhqjyfitjcnbqdmywezdvmryvyp/ArchiveIntermediates/db/IntermediateBuildFilesPath/db.build/Release-iphoneos/db.build/Objects-normal/armv6/fmdb.o and /Users/tj/Library/Developer/Xcode/DerivedData/db-afhqjyfitjcnbqdmywezdvmryvyp/ArchiveIntermediates/db/IntermediateBuildFilesPath/db.build/Release-iphoneos/db.build/Objects-normal/armv6/main.o for architecture armv6
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

Trausti

  • 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-23T11:03:10+00:00Added an answer on May 23, 2026 at 11:03 am

    What I would suggest is to make ASIHTTPRequest into a static library of its own, by adding it as a dependency project in your static library’s project. Essentially what you do, is to create an xcode project, pack ASIHTTPRequest into it, close that project, then drag&drop the ASIHTTPRequest project file into your static library project’s file navigator. This will add it as a dependency project and automatically build it as a static library and link your project against it.

    When using your static library in one of your application projects do the same. It is easier to manage your static library as a dependency project which in turn has ASIHTTPRequest as another level of dependency. This way both of your projects will be able to see its headers, and link against it and there will be no duplicate symbol issues.

    If you are trying to publish your static library to other developers then it is a more difficult situation…

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

Sidebar

Related Questions

I have written a static library to re-use some code between iOS projects, let's
I have a static library that I have built with MinGW, I am trying
I have a shared library project that is built from 4 static libraries (
I have built an application that uses SQL Express 2005 and I want to
I have a static library built with 3.1.3. I'm including it into an application,
I have a static library project that I inherited from another developer. I added
I have a project that has a dependency on a static library. In Xcode
I have an iPhone SDK project that is supposed to build a static library
I have built a static library in my home directory and there is also
I have an iOS project that is built upon a framework project that we

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.