cancel
Showing results for 
Search instead for 
Did you mean: 

uVision514: cannot open source file *.h

enmirc
Associate II
Posted on September 11, 2016 at 07:47

Hi guys,

1. compile proj. Keil51 uVision: ->   error: #5: cannot open source file ''MCode.h'' 

2. MCode.c

   #include ''MCode.h''

   ...

3. Options for target -> c/c++ -> path ../user 

4. user (MCode.h) etc.. 

Q: it seems everything is ok, but why compiler does not find MCode.h ??

thank you for the answers ..                                br M.

5 REPLIES 5
Posted on September 11, 2016 at 23:19

Q: it seems everything is ok, but why compiler does not find MCode.h ??

Because it is not being told to look in the right places, you will need to provide an adequately complete list in (3) for it to be able to find the files. You could also try the < > form if you are absolutely sure the search paths list is correct/complete. I'd start by reviewing the project.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
enmirc
Associate II
enmirc
Associate II
Posted on September 15, 2016 at 09:17

hello Clive1,

I attached my project, could you be so kind

and check what is wrong ? I did as you said

but uVision5 refuse to include my file ..   br M.

slimen
Senior
Posted on September 15, 2016 at 12:04

Hi mickey,

Issue due to the file name defined with space ''MCode .h'' !

You should remove the space between MCode and (.h).

Make sure you have the include paths specified properly, clean Target, then rebuild all target files.

Regards
enmirc
Associate II
Posted on September 17, 2016 at 12:03

tnx a lot, o God I need new glasses ..