title: Compile an iOS Objective-C command line app through gcc on mac
body: <p>Here is a very simple Objective-C console app:</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  #import &lt;CoreLocation/CoreLocation.h&gt;
  
  int main (int argc, const char * argv[]) {
      NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
  
      CLLocationManager *locationManager = [[CLLocationManager alloc] init];
      NSLog(@"Hello world!");
  
      [pool drain];
  
      return 0;
  }
  </code></pre>
  
  <p>I compile it with <code>gcc main.m -o main -ObjC -framework Foundation -framework CoreLocation</code> on my Mac.</p>
  
  <p>I also have the iOS SDK installed on my mac. How can I modify this command to <strong>compile the same code, <em>on my computer</em>, for use on a (jailbroken) iOS device</strong> ?</p>
  
  <p>I could then transfer the executable through ssh and sign it with <code>ldid</code>.</p>