PDA

View Full Version : Xcode re-compiles only every second time


Aglarion
2006.09.21, 03:07 PM
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:
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 :)

Taxxodium
2006.09.21, 04:17 PM
Try cleaning your target and then build again.

akb825
2006.09.21, 05:07 PM
In general, whenever you have really weird compile errors, cleaning the target usually fixes it.

Aglarion
2006.09.21, 06:14 PM
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...

OneSadCookie
2006.09.21, 06:43 PM
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 ;)

TomorrowPlusX
2006.09.21, 06:48 PM
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.

Aglarion
2006.09.22, 10:55 AM
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...

vbuser1338
2006.12.27, 04:49 PM
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

MacFiend
2006.12.28, 01:11 PM
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!!

vbuser1338
2006.12.28, 05:59 PM
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.

bronxbomber92
2006.12.28, 11:41 PM
Could compile Code::Blocks (too bad they don't provide a binary version of it).

vbuser1338
2006.12.29, 10:42 AM
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?title=Installing_Code::Blocks_from_sourc e_on_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.