When I compile (command-K) my test program (test.c), I get an error (no such file or directory) on an #include statement in a C module, but the target file (testadd.c) is right there in the XCode folder and in the same Finder directory as all the other files. I have tried moving the target file up and down in the XCode folder and deleting the target file and recreating it, no help. I even tried putting the full path name into the <> parameter of the #include, no help.
A reduced project that demonstrates this error contains 5 source files, all physically stored in the same Finder folder:
In XCode's Scripts folder,
1) An Applescript stub
In XCode's "Other Sources" folder,
2) main.m - I'm not sure what to do with this
3) test.h - with the following source:
//dummy test.h for testing
typedef int bit;
bit TMR1IF = 0;
4) test.c - with the following source:
//Dummy test.c to demo #include problem
#include <test.h> //<-- this #include seems to work (TMR1IF seems defined)
int main(void) {
if (TMR1IF); //stub
return 1;
}
#include <testadd.c> //<-- this is the line that gets the error,
// * testadd.c: No such file or directory *
5) testadd.c - with the following source:
void isp(void) {