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 "c:\\dir\\file.c" problem

Could some one show me how to #include an absolute file such as:
#include "c:\\dir\\file.c"
This doesn't seem to work with C51 version 1.32

The file is there but the compiler says it can't open it
Thanks,

Michelle

Parents
  • Hi Michelle,

    1. Why do you include *.c file. It is not common praxis.
    There is better to include header file (*.h)
    instead of *.C file.

    2. Try to use #include "c:\dir\file.h" notation
    instead of #include "c:\\dir\\file.h".

    Vaclav

    BTW: Keil respect also "c:/dir/file.h"
    notation to satisfy MISRA C rules, I guess.

Reply
  • Hi Michelle,

    1. Why do you include *.c file. It is not common praxis.
    There is better to include header file (*.h)
    instead of *.C file.

    2. Try to use #include "c:\dir\file.h" notation
    instead of #include "c:\\dir\\file.h".

    Vaclav

    BTW: Keil respect also "c:/dir/file.h"
    notation to satisfy MISRA C rules, I guess.

Children