Re: Editing a file causes the object file to become duplicated and corrupt???
Re: Editing a file causes the object file to become duplicated and corrupt???
- Subject: Re: Editing a file causes the object file to become duplicated and corrupt???
- From: Howard Moon <email@hidden>
- Date: Thu, 06 Feb 2014 10:19:44 -0800
After some more testing, I see that it DOES behave the same on other files in the project. Any .cpp file that I edit and save causes the linker to fail due to the wrong object file being used, apparently. It looks like the latest backup/duplicate/version of the object file (which has a .o~$ extension) becomes the new .o file, and it's always 288 bytes in size.
But other projects do not exhibit this problem, so I'm confused as to what might be going on here!
-Howard
On Feb 6, 2014, at 9:23 AM, Howard Moon wrote:
> I've using Xcode 3.2.6 (in OS X 10.7.5), and am getting strange behavior. If I do a Clean and then Build, all is well. However, if I then edit a particular file, then do a Build, I get link errors.
>
> After I get the link errors, if I look at the object files, I see that the .o file has been duplicated several times, with different extensions. The resulting .o file is lacking most of its content, and is only 288 bytes in size, and so naturally I get link errors when I compile. After some testing, I noticed that the duplication occurs not when building, but at the instant that I begin to EDIT the file! It also makes another file after I SAVE the file! What the heck is going on???
>
> (This only happens with this one project, by the way, and doesn't happen with any of the other files in this project that I've happened to edit after building, either!)
>
> I assume that Xcode is making backups in order to do some "Code Sense" behind-the-scenes building, but why would it leave those backups there and leave my actual .o file in a state that is unusable? Shouldn't it delete the .o or rebuild it when I do a Build? More importantly, how do I FIX it? At the moment, the only thing that I can see to do is to delete the .o file and its backups before I re-Build. I don't want to do a Clean and re-Build every time I edit one file, and hunting down the object files and deleting them manually is not much better.
>
> Anyone know what I can do here?
>
> Thanks,
> Howard
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden