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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:44:16+00:00 2026-05-12T18:44:16+00:00

I have searched for hours however I still have no clue what is wrong

  • 0

I have searched for hours however I still have no clue what is wrong with my configuration.
My project uses a self-written libray (myLib). This library is compiled to work only for simulator and it works perfectly there.

What do have to change so it compiles for my iPhone Device as well?

This is my current warning:

ld: warning: in /.../myLib.a, file is not of required architecture

This is my configuration (of myLib.a)

alt text

I found a lot of articles explaining the reason for this error however I could not find a solution:

The simulator runs on an x86
architecture, while the device uses an
ARM architecture.


What do I have to change to get my library working on my iPhone?

Thanks


Edit:

What I did so far:

  1. Cleaned both projects
  2. Set library to ‘Device’ (3.1)
  3. Built the library
  4. Dragged the .a file of my library into my application

Result:

This works in simulator but setting the active sdk to device still raises a file is not of required architecture error.

I also tried mahboudz ( thanks for your support) link.
It explains howto built the project using a shell script.
However XCode keeps complaining that the library file is of the wrong architecture and the build fails.

This has to be a really stupid beginners mistake.

  • 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-12T18:44:16+00:00Added an answer on May 12, 2026 at 6:44 pm

    You need to add both .a files,the one built for the device (build/$config-iphoneos)and the one built for the sim (build/$config-iphonesimulator) to the new project. Make sure you name them differently before dropping them in. This is how admob and similar offering ship their static libs.

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

Sidebar

Related Questions

This is quite a noobish question, I have searched for a few hours now
ok, i have searched for this in the past two hours with results that
I have searched for hours now and haven't found a solution for my problem.
I have searched for hours for the answer to my question and have found
Up till now I have searched for hours on end and have not found
I have searched for a good couple hours now, looking for a solution to
I have tried everything, searched the net for two hours or even more and
I have searched for this, and i found that for api less than 12,
I have searched for a general solution to this but only find answers to
I have searched all morning and yesterday afternoon and still cannot find an solution

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.