Xcode re-compiles only every second time

Aglarion
Unregistered
 
Post: #1
Xcode compiles my project only every second time I let it compile (even if I changed a sourcefile). The other times, it prints a warning:
Quote:warning: couldn't move 'build/btas.build/Debug/main.build/Objects-normal/ppc/menugamestate.o~$' to 'build/btas.build/Debug/main.build/Objects-normal/ppc/menugamestate.o': No such file or directory

Why would it try to move that ~$-file? Or even more interesting: What is this file? I know what objectfiles are, but what is Xcode (or gcc?) doing with this ~$-file? Is this some kind of temporary output file?

Has somebody ever had the same problem? How did you fix it?

PS: Please excuse my terrible english Smile
Quote this message in a reply
Moderator
Posts: 508
Joined: 2002.09
Post: #2
Try cleaning your target and then build again.

"When you dream, there are no rules..."
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #3
In general, whenever you have really weird compile errors, cleaning the target usually fixes it.
Quote this message in a reply
Aglarion
Unregistered
 
Post: #4
I tried this before. I tried again, I even deleted the whole Debug directory.

Didn't help...

Interestingly, this problem occurs only in one target of the project (there are about 15 dylibs in the project: all of them build without that problem).

Is there something from Apple about the build process in Xcode? I searched their site already, but seemingly have the wrong search phrases...
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #5
If you want to know *what* Xcode is doing, you can look at the detailed build log (the tiny button that looks like 3 lines of text under the errors & warnings pane).

If you want to know *why* Xcode is doing that, well, you'll have to work it out yourself Wink
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #6
Try cleaning, deleting the *entire* build subdir ( this will kill the caches ) and quit and restart Xcode.

Xcode's not as finicky as it was back in the day, but that was my standard routine for when it couldn't get its head out of its posterior.
Quote this message in a reply
Aglarion
Unregistered
 
Post: #7
I deleted the whole build-directory. Nothing changed.

I guess, I'll have to recreate the target, re-add the files and try again then. I guess there's something wrong with the build-settings.

I thought, I could go without doing so, since there are quite a lot of things to set up, add libraries, header search paths, preprocessor macros and similar stuff in the build settings.

Thanks for your help...
Quote this message in a reply
Member
Posts: 35
Joined: 2005.01
Post: #8
I am having a similar problem but doing a clean works for me. I get errors where I have undefined link errors when I delete/change functions and still call them instead of giving me a compiler error. I also get code that should execute but does not and it gets fairly hard to figure out why something isn't working. Has anyone found out what could be wrong?

Thanks,
vbuser
Quote this message in a reply
Member
Posts: 148
Joined: 2003.03
Post: #9
Try turning off Predictive Compilation, and then clean your target, and see if that doesn't help.

Predictive Compilation seems to be very untrustworhty.
Especially while debugging - it WILL cause you headaches.
Very hard to track down a bug when XCode isn't registering any of the changes you made because it compiled your source already. Bad, bad, Apple.
You'll be adding bugs on top of bugs without even realizing it.

JUST SAY NO TO PREDICTIVE COMPILATION!!
Quote this message in a reply
Member
Posts: 35
Joined: 2005.01
Post: #10
Thanks for the reply. I have already tried this as well as reinstalling and making a new project and unfortunately none of these worked. I give up on xcode and I am going to have to put up with the kind of slow eclipse until I find a better option.

Thanks again for the help.
Quote this message in a reply
Member
Posts: 312
Joined: 2006.10
Post: #11
Could compile Code::Blocks (too bad they don't provide a binary version of it).
Quote this message in a reply
Member
Posts: 35
Joined: 2005.01
Post: #12
I tried getting code blocks to work but I can't figure out how to compile it. I am using the tutorial from http://wiki.codeblocks.org/index.php?tit...n_Mac_OS_X but when I get to this part I have no idea what to do:
AUTOMAKE=automake-1.7 ACLOCAL=aclocal-1.7 ACLOCAL_FLAGS="-I /usr/share/aclocal" ./bootstrap

I also can't get logged in the subversion repository so I have the latest stable release which is quite old and I think a lot of fixes have been made in the repository.

Thanks for the suggestion but it looks like I'm sticking with eclipse.
Quote this message in a reply
Post Reply