Reinstall Xcode?

Discussion in 'Mac Programming' started by GorillaPaws, Feb 6, 2010.

  1. GorillaPaws macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #1
    I just started getting weird errors in Xcode 3.2 with a project that was working fine. I compiled and tested my app and it ran fine; I made a couple minor changes and it compiled fine but throws and exception at runtime when I called a method. I commented out the changes so it was identical to the previous, working code, and it still throws the exception. It's gives me an error:
    I haven't moved or deleted any files.

    So I monkey around for a while (code looks good) and still no luck, and I finally try to run it on a second machine (a SL iMac also running Xcode 3.2) and it runs perfectly. So I uncomment the changes I made, and it still runs fine.

    So obviously somethings going on with my macBook, that's not happening on my iMac. I don't really have any experience with this kind of situation so I'm not sure where to go next. I guess I could try re-installing Xcode, but I was wondering what might be causing the problem and what I can do to prevent it in the future. Thanks for any help you can share.
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    Clean All, then Build.

    For some reason, Xcode or one of its components can still get confused or lost. I have seen this problem off and on for years. Since ProjectBuilder, even.

    If Clean All doesn't correct it, then trash the actual build folder manually. This will force Xcode to do a complete rebuild from scratch.

    And sometimes, you have to quit Xcode, trash the build folder (and empty trash), then relaunch Xcode. I have no idea why, only an untested theory involving phase of the moon and poxy gremlins.
     
  3. GorillaPaws thread starter macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #3
    I had tried the cleaning to no avail, but trashing the actual build folder did the trick. Thanks so much for you help chown33. This was the first problem I've ever had that wasn't my fault. I'm not used to thinking the problem isn't me--lmao.
     
  4. steavelee2 macrumors newbie

    Joined:
    Feb 3, 2010
    #4
    So I bought a C++ book, to learn how to program. It says to install Xcode on my Mac because it is the best. But when I go to their site I can't find a straight download. How do I install this?
     
  5. GorillaPaws thread starter macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #5
    The easiest way to install Xcode is to use the OSX install DVD and look for the developer tools under the custom(or perhaps optional) install options.
     

Share This Page