This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

#include in C51 retrieves wrong header file

I am designing a project using the Keil C51 V7.50 and
uVision 3 IDE V3.10a on a Silicon Labs C8051F046 MCU. My
project contains source file foo.c, which contains a
directive:

    #include "foo.h"

where foo.h contains standard header info and is located in
the same directory as foo.c.

When I run C51 from the command line, this module compiles
as I expect, but when I compile within uVision 3, it goes
out and finds another foo.h, located in another directory on
the same drive, which is not set up for this project, and
the compile fails.

I can find nothing in the documentation to explain this. I
have checked all the tabs in the "options" dialog box. When
I copy my correct foo.h into the alien directory, uVision 3
will compile it correctly, but I am not content to function
this way.

Any clues why this is happening?
============================================================
Gary Lynch            |     To send mail, change no$pam in
lynchg@no$pam.com     |     my domain name to stacoenergy

Parents
  • Gary;
    The uV3 IDE is constructed for target systems just as you described.
    In a single project, you define targets for Board1..thru..Board5. All source files exist for all targets. However, you can then set options at the target, group or file level to include/exclude files for each target.
    You still have one set of source code in one place simplifying bookkeeping.
    Of course you can fine tune single files with the normal #ifdef directives.
    Of course, if you are like Erik, you can make it more complex with batch files and make files.
    Bradford

Reply
  • Gary;
    The uV3 IDE is constructed for target systems just as you described.
    In a single project, you define targets for Board1..thru..Board5. All source files exist for all targets. However, you can then set options at the target, group or file level to include/exclude files for each target.
    You still have one set of source code in one place simplifying bookkeeping.
    Of course you can fine tune single files with the normal #ifdef directives.
    Of course, if you are like Erik, you can make it more complex with batch files and make files.
    Bradford

Children
No data