+ Reply
Results 1 to 3 of 3
  1. #1
    What's Jailbreak?
    Join Date
    Oct 2008
    Location
    Los Angeles, CA
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Question total n00b question

    so i am just trying to learn obj-c
    i have this book: [ame="http://www.amazon.com/Programming-Objective-C-Developers-Library-Stephen/dp/0672325861/ref=pd_bbs_sr_2?ie=UTF8&s=books&qid=1224921644&sr= 8-2"]Programming in Objective-C (Developer's Library)[/ame]
    so i just wanna make my first hello world app
    but this (old) book still refers to project builder, the old xcode
    my code for the app looks like this:
    Code:
    //
    //  main.m
    //  prog2
    //
    //  Created by Mykel2727 on 10/24/08.
    //  Copyright __MyCompanyName__ 2008. All rights reserved.
    //
    
    #import <stdio.h>
    
    int main(int argc, char *argv[])
    {
        printf ("Hello World!!!n");
    	
    	return 0;
    }
    thats in the main.m file
    and i selected cocoa application as my choice at the beginning

    i know my code is fine,
    its just that xcode doesn't like this
    i hit build and go and nothing happens
    what do i do

    thnks
    Last edited by Mykel2727; 10-25-2008 at 10:45 AM.

  2. #2
    Developer NetMage's Avatar
    Join Date
    Aug 2007
    Location
    Virginia
    Posts
    1,292
    Thanks
    71
    Thanked 210 Times in 168 Posts

    Are you familiar with any GUI development at all?

    That program would be run from a command line and would only work from a shell prompt on a jailbroken iPhone. It is basically a C program, not Objective-C.

    Look for the jailbreak Hello World sample to get a vague idea - I believe the main.m has changed in 2.x:

    A Simpler "Hello World" for the iPhone - O&#039;Reilly Mac DevCenter Blog
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage

  3. #3
    What's Jailbreak?
    Join Date
    Oct 2008
    Location
    Los Angeles, CA
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts

    k nvm i got it
    i was just tired and wasnt thinking straight

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts