Post

Replies

Boosts

Views

Activity

Reply to Project Won't Build with .h File
The project has both C and Objective C source code files. XCode won't build either .c or .m files because it doesn't include the .h files in the target so the functions in the .c and .m files are undefined. Also there are a few other weird errors like: NSString - unknown type. This is probably also a no headers error. There is no Swift. On June 15th I changed the location or an NSTextField in a .xib. XCode blew up and never worked again in spite of my extraordinary efforts to fix it, checking everything, reading the documentation, rebuilding everything and even buying a new Apple Silicon Mac (which I needed to do anyway), knowing that there is not really any help for Mac developers. It is VERY unlikely that there is a name collision. This project was created in about 2010 so it would have been obvious by now. Also if you add the same file to an xcodeproj twice it will generate a warning so it is likely that XCode will report this as an error. Here is an example of real source code in a .h file: #include <stdio.h> void cocoaAlertForC(char *errorType, char *message); XCode underscores the void declaration and reports Expected identifier or '(' - obviously a spurious error. It does this with or without the #include. There's just no way to Force XCode to recognize header files in the Build folder with the old Project or in the target in the newly created project. DTS is not interested in helping me. I feel like I have to give up.
Jul ’23
Reply to Project Won't Build with .h File
I decided to create a new project. This was very difficult because XCode wanted me to a lot of things that weren't required before and aren't described as needed in the documentation, for example put the project in a workspace and use a hierarchy with the .xcodeproj in a folder with the source code files in a folder in the same parent folder. I still have the same problem. I can drag a .h file from the source code files to the project navigator. XCode asks if I want to add it to the target. I check yes but when I build the project I get two errors: in the .h file the first character in the first line of code is underscored and there is an error "Expected identifier or'('. The second error is if I analyze or compile the .h file: "'headerfile.h' is not a member of any targets in the current scheme that build for running". When I use the attributes inspector to look at the target membership of the .h file the checkbox for target membership is not selected. Obviously these are spurious errors. I can't build any .c or .m file with the header #included or #imported because XCode won't add it to the target. It has now been three weeks since I filed a Developer Technical Service request so my speculation that "as soon as I have time" means never is probably correct. Since I haven't been able to get any help anywhere I might have to accept the fact that after about 25 years of programming on the Mac I am now an ex-developer.
Jul ’23
Reply to Project Won't Build with .h File
Now there is a little good news. This computer has a number of small projects used to develop relatively small pieces of code for use in larger programs. These will now build and run. I don't know if I can add new .h, .c or .m files to them but at least they build and run. Since there is some problem with files in the files/folders created for my program that I need to update, could I delete everything related to the project in my ~/Library/Developer/XCode/DerivedData/appname-ishkabbiblegobbldegook folder? Or at least the ishkabibble/Build folder? When you create and build a new project, XCode creates these so will it create the folders/files it needs or will I be even more screwed than I am now?
Jul ’23
Reply to Project Won't Build with .h File
I moved everything to a new 24" Apple silicon iMac, hoping that it would help. I installed XCode 14.3.1. During the installation from the App Store it checked my old version of XCode and it said that it was damaged and recommended that I move it to the trash - good idea, since it was FUBAR. After I installed XCode 14.3.1 I tried to build my most important project it still won't build, With the same errors - it can't build any .m or .c file with a #include or #import any .h. Any .h header file in the project won't build with a spurious error: Expected identifier or '(' at the first line of text after the #includes. Then the file in which the .h is #included won't build:undeclared function (in the .h file that won't build). The newer version of XCode reports a different error: missing input '/Users/myname/Library/Developer/XCode/DerivedData/appname-gobldegookishkabibble/Build/intermediates.noindex/appname.build/Debug/appname.build/Objects-normal/arm64/sourcecodefilename.o'and no rule to build it Of course this is not helpful. I filed a DTS request for help on June 16th - 19 days ago but all I have received is a response saying that DTS is swamped (I'll bet) and that when the representative assigned to this case has some time I will get a response. I'm guessing that this will be never. I guess that when XCode decided to commit suicide it also killed all of my projects. On difference is that I don't see an XCBBuildService crash in the Console.
Jul ’23
Reply to Project Won't Build with .h File
Today I upgraded to MAC OS 12.6.7. After I restarted my mac XCode asked me to install additional shared components. I did. This didn't help. According to XCode Help You can go to File > Project Settings... This will show a panel that will have a pop-up menu to select either the old or new Build System. This sounded promising but unfortunately In XCode 14.2 there isn't really any pop-up menu to do this. No help from DTS.
Jun ’23
Reply to Project Won't Build with .h File
Finally I decided to do the really difficult thing. I created a new XCode multiple document project and began to carefully add the source files to it. I got about half way through before XCode failed to add a .h file to the project. After doing this several times it added the .h file but it won't build because it generates the dreaded Expected identifier or '(' error at the first ocurance of any text in the file after the compiler directives. This is HORRIFYING.
Jun ’23
Reply to Project Won't Build with .h File
After spending a great deal of time trying to diagnose and fix this problem I have been able to ascertain that: On June 15th XCBBuildService, a component of XCode, crashed. This killed Xcode. Now I can’t build my projects because even though the header files in the projects are installed correctly and have the correct target membership, the analyzer thinks that they are not in the build scheme of the project. When I try to build a project Xcode will fail to build as soon as it encounters a header file. It will report the spurious error: Expected identifier or ‘(‘ as soon as there is any text after any #includes. This is function prototypes but also statements like enum. Then it will report an error of undefined functions in a file where the prototypes are in the .h file that it now can’t build. I can’t install the latest version of Xcode because I’m using an Intel iMac. How in the world can I possibly fix this?
Jun ’23