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

  • Home
  • SEARCH
  • 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 6639321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:32:26+00:00 2026-05-25T23:32:26+00:00

I have been tasked to create object .o files for an iOS project in

  • 0

I have been tasked to create object .o files for an iOS project in Xcode 4. I have tried the following command which works on NSObject classes

gcc -c implemtationfile.m

but if I try to run the command on a class inherited from UIViewController for example I get a ton of errors starting with

UIKit/UIKit.h: No such file or directory

Secondly, since there are multiple files in the project, is it possible to create one .o file for all source files?

  • 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-25T23:32:27+00:00Added an answer on May 25, 2026 at 11:32 pm

    Not surprised you’ve got errors.

    You are trying to compile iOS code from OSX. If you invoke GCC from the terminal, you’ll get the Mac OS X compiler.

    Even if it can produce .o files, those object files are Mach-O object files, meaning they are compiled as object-files against the Mac OS X compiler tool-chain.

    No iOS here. Your object files will have the Intel (x86) or PPC architecture. iPhone is ARM, so you’re wasted.

    You should be able to proceed ARM object files using the right GCC compiler tool-chain.

    Something like:

    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.0.1
    

    I haven’t tested, but that’s clear that you need to use the iPhone ARM version of GCC. Just invoking GCC will invoke the Mac OS X version (in /usr/bin/).

    A compiler like GCC needs to be compiled for a host and a target architecture.

    The host architecture is the architecture in which you will invoke the compiler.
    The target one is the architecture for which you’ll build binaries, or object files.

    So try to compile your code with the correct version of GCC, which suits the iPhone target architecture.

    Also note that, if compiling against a framework, you should use the -framework GCC argument.

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

Sidebar

Related Questions

I have been tasked with creating a program what will create take files in
Greetings! I have been tasked to create a report off files we receive from
So I have been tasked to create a site which has a dentist locator
I have been tasked to create a form designer application in Windows Forms. The
I have been tasked with converting several php classes into java classes, which is
I've been tasked to create a PHP app which accesses an existing PostgreSQL database.
I have been tasked to create a C# interface with some of the methods
Basically I have been tasked with tackling the following scenario: When you are designing
I have been tasked with a project at work of writing a class to
I have been tasked to create a layout editor for my companies internal Reporting

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.