views:

43

answers:

2

When I make code changes to my iPhone game project in XCode, and then do CMD-B + Enter, I expect the project to be saved, build and run on the simulator with the latest. What is happening though, sometimes, is that it doesn't pick up a small change I make unless I clean the project and then build.

I'm a long time Java person and newish to C-based languages and it's compiler. Can someone explain to me what is cached after each build that does this and how to change my project settings to avoid having to clean everytime? Or tell me the bad news that this is part of C development? Not trying to bash it - I get compiled JSPs stuck in the working cache often in Java, too. :P

UPDATE: Does this have to do with the location of my builds at all? That's the only thing I can think of that's changed from a build config perspective.

A: 

Seems odd to me, because I never get this problem in XCode. It's not a common issue with C or anything. The tools for C-based languages usually do this just as well as the Java ones.

invariant
Yeah I don't think it's a native C thing ... each time the compiler runs it will create a new compilation. It's got to be an environment thing where XCode or the OS is not recognizing a file as "changed".
Greg
A: 

In the Xcode Build Preferences make sure that "Unsaved Files" is set to "Always Save". If not, Xcode will not autosave files before building and will use the last version saved to disk.

TechZen
I'm in the Build tab of my Project Settings and I don't see an entry for "Unsaved Files". Can you elaborate?
Greg
It's not in the project preferences. It's in the application preferences in the menu Xcode>Preferences>Build
TechZen