So I've got this project that I haven't worked on in a long time. It
still compiles fine in Dynamic C Premier 9.21. But then today I
decided to move some #defines and a struct out of one header and into
another. I then added the new header file to LIB.DIR, and #used the
new header file as well. Upon compilation, I got a slew of errors,
basically saying that all of the #defines that I moved are "out of scope".
The funny thing is that if I try to open the file via the context
menu, the new header file opens fine, which proves that DC was able to
scan successfully and find the file... and those #defines are
definitely there.
I then tried to upgrade to DCP 9.52 -- same problem.
I then tried to recreate the problem using a really basic sample
program, so that I could post the code here. Here's what I did:
1. created header file called "argh.h", and all it has inside is:
#define ARGH 1
2. created a program file called "test.c", and it looks like this:
#memmap xmem
#use "argh.h"
void main()
{
int i;
i = ARGH;
}
This works fine IF I don't assign i to ARGH, but if I do, I get the
following error:
line 8 : ERROR TEST.C : ARGH is out of scope/ not declared.
Now, it's possible that I'm missing something because I haven't used
DCP in a long time, but I believe this should compile! :)
Has anyone else had ridiculous compiler issues like this before? Any
idea how to solve it? I've tried:
- moving files around in LIB.DIR
- moving the #use around in the file
- commenting out everything in the header file and moving one #define
to the top -- still got the compiler error
I'm totally confused...

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )