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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:12:37+00:00 2026-05-26T00:12:37+00:00

Here is a very simple Objective-C console app: #import <Foundation/Foundation.h> #import <CoreLocation/CoreLocation.h> int main

  • 0

Here is a very simple Objective-C console app:

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

    CLLocationManager *locationManager = [[CLLocationManager alloc] init];
    NSLog(@"Hello world!");

    [pool drain];

    return 0;
}

I compile it with gcc main.m -o main -ObjC -framework Foundation -framework CoreLocation on my Mac.

I also have the iOS SDK installed on my mac. How can I modify this command to compile the same code, on my computer, for use on a (jailbroken) iOS device ?

I could then transfer the executable through ssh and sign it with ldid.

  • 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-26T00:12:37+00:00Added an answer on May 26, 2026 at 12:12 am

    Assuming you’re not wedded to fusty old GCC, deliberately triggering errors in my project so as to get into a position where Xcode will reveal the command line used revealed the following for compilation:

    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -x
    objective-c -arch armv6 -fmessage-length=0
    -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id
    -fdiagnostics-parseable-fixits -std=gnu99 -Wno-trigraphs
    -fpascal-strings -O0 -Wmissing-prototypes -Wreturn-type -Wparentheses
    -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value
    -DDEBUG=1 -isysroot
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk
    -gdwarf-2 -mthumb “-DIBOutlet=attribute((iboutlet))”
    “-DIBOutletCollection(ClassName)=attribute((iboutletcollection(ClassName)))”
    “-DIBAction=void)attribute((ibaction)” -miphoneos-version-min=3.2
    -iquote [a bookkeeping file] -I[a list of headers] -iquote [more
    headers] -I[an include path] -fpch-preprocess -F[pointer to directory
    for debug files] -include [my prefix header] -c AppDelegate.m -o
    AppDelegate.o

    If you’re declining the use of Xcode then I guess you can cut the stuff about Interface Builder outlets at the very least. And building for armv6 rather than v7 is probably an error in my project.

    And then, to link:

    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -arch
    armv6 -isysroot
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk
    -L[something appropriate] -F[something appropriate] -filelist [a
    .LinkFileList] -dead_strip -miphoneos-version-min=3.2 -framework
    SystemConfiguration -framework UIKit -framework Foundation -framework
    CoreGraphics -o [something appropriate]

    The .LinkedFileList file seems just to be a list of object files, one per line. Xcode has put the full path to each in there, though I’d guess relative paths to be acceptable.

    I appreciate this isn’t a full answer, but hopefully it helps?

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

Sidebar

Related Questions

I have a very simple Objective-C sample #import <Foundation/Foundation.h> int littleFunction(); int main (int
I'm very new to Objective-C and Cocoa but I've made a simple app which
Here's a very simple AS3 project. The stage is not null in the main
Here's a very simple Prototype example. All it does is, on window load, an
Here's a very simple question. I have an SP that inserts a row into
I hope I am not missing something very simple here. I have done a
My goal here is to create a very simple template language. At the moment,
I guess there will be a very simple answer to this. But here goes.
¿How would I do the operation described here , which is very simple from
i'm missing something fundamental here. i have a very simple custom class that draws

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.