Keil Logo

C51: UNABLE TO FIND INCLUDE FILES USING LONG DIRECTORY NAMES


Information in this article applies to:

  • C51 Version 5.50

QUESTION

My project is stored in the following directory:

C:\DEV\EPILOGUE_51

and my header files are stored in:

C:\DEV\EPILOGUE_51\H

I have added the path to the header directory to the C51INC variable in my AUTOEXEC.BAT.

When I build my project at the DOS prompt, the compiler cannot find the header file. Why?

ANSWER

The C51 compiler is a 16-bit program and cannot support long path names. There are several solutions or work-arounds to this problem:

  • Rename the directory with the long name.
  • Add the following to your AUTOEXEC.BAT file:
    SET C51IC=C:\DEV\EPILOG~1\H
    
    You can find out the correct shortened name by going into the DEV directory and typing 'DIR'.
  • Use the compiler's INCDIR directive to specify the 'H' header directory:
    C51 TEST.C INCDIR(H)
    

MORE INFORMATION

Last Reviewed: Sunday, January 21, 2007


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.