> > > > > Here's what I thought would work, but doesn't: > > ... > > #define myvariable 123 > > #include "myotherfile.asm" > > ... > > I figured that by the time the compiler got to building > > myotherfile.asm, the > > variable myvariable would be defined. However, that's not the > > behavior I've > > seen. The compiler complains that the symbol myvariable is not > > defined. > > That looks like it should work to me. Are you sure that you have > "myvariable" capitalized the same way in both files? Can you reduce > your code to a minimum and post it along with the exact error messages > produced?) > Doh... I solved it. I had "myotherfile.asm" both as an #include from my main file, AND as a source file in my project. When the compiler went to compile the file as a file in my project it did so without the symbols defined in the first file. I removed the file as a source file in the project but kept it as an #include and got the expected behavior. It all makes perfect sense to me now! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist