XCode Question

jbljbl
Posted:
in Genius Bar edited January 2014
I am pretty much a novice programmer. I have written a Cocoa program on one machine using XCode. It runs fine on that machine, both when run under XCode and when I double click on the standalone application. Then I copy it to another computer (which does not have XCode installed). I double click on it and nothing happens. If I look in the console I get a lot of messages like "ZeroLink: could not load .o file: /Users/..."

Looks like it is not actually linking the program for deployment, but I don't know how to link properly. If I get info on the project and select the styles tab it says that the current build style is deployment and the box next to ZeroLink is unchecked. What am I doing wrong?



This is with XCode 1.5 under 10.3.8.



Thanks.

Comments

  • Reply 1 of 3
    pyr3pyr3 Posts: 946member
    Quote:

    Originally posted by JBL

    I am pretty much a novice programmer. I have written a Cocoa program on one machine using XCode. It runs fine on that machine, both when run under XCode and when I double click on the standalone application. Then I copy it to another computer (which does not have XCode installed). I double click on it and nothing happens. If I look in the console I get a lot of messages like "ZeroLink: could not load .o file: /Users/..."

    Looks like it is not actually linking the program for deployment, but I don't know how to link properly. If I get info on the project and select the styles tab it says that the current build style is deployment and the box next to ZeroLink is unchecked. What am I doing wrong?



    This is with XCode 1.5 under 10.3.8.



    Thanks.




    There is an option in Xcode somewhere to export it 'as a product' or something like that. I haven't done any Cocoa development on Xcode, but i compiled a CVS version of Adium once and I had to do that to get it to run outside of the directory it was in. I think that it was in a faq on adium's message boards, or on their site. You could check that out. Adiumx.com
  • Reply 2 of 3
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by JBL

    I am pretty much a novice programmer. I have written a Cocoa program on one machine using XCode. It runs fine on that machine, both when run under XCode and when I double click on the standalone application. Then I copy it to another computer (which does not have XCode installed). I double click on it and nothing happens. If I look in the console I get a lot of messages like "ZeroLink: could not load .o file: /Users/..."

    Looks like it is not actually linking the program for deployment, but I don't know how to link properly. If I get info on the project and select the styles tab it says that the current build style is deployment and the box next to ZeroLink is unchecked. What am I doing wrong?



    This is with XCode 1.5 under 10.3.8.



    Thanks.




    Hmmm..



    You tried cleaning the targets and then building?

    And you are double-clicking on the .app file, right? The one inside the "Build" folder.
  • Reply 3 of 3
    jbljbl Posts: 555member
    Well, I got it to work, although I am still not sure why it was doing what it was doing. In the styles tab of the project info dialog box there is a place to specify the path to the build products. It was blank. The documentation says that the default is /tmp/. I looked in /tmp/ and there was nothing there. I searched for the application and the only one with the correct name was in the same location as the development builds had been (and that one had a modification date of approximately when I last tried to compile and seemed to have the problems described above). Then I set the path to the build products to be ~/tmp/. When I compiled, it recompiled the entire project and when it was done there was an application in ~/tmp/ that actually worked.



    Anyway, thanks for your suggestions.
Sign In or Register to comment.