Hi I want to have a header file(.h) so I can put function prototypes in it & include this .h file in the other files that use these functions just as standard C. But I've problems for including the .h file as a custom file in my project & linking/compiling it with the other files in the project. How is this done in C51? Looking for your comments. Best Regards,Smal
Create some header file (for example "my.h"), isert following string into ur main file: '#include "my.h"', put "my.h" file in the same directory as the main file or, alternatively, include the path to this file in "Include paths" option in "C51" settings page of target options of ur project in uVision IDE. U don't need to add a header files to the project - just write an "#include" directive in the main file. But ofcourse u need to include to ur project all .obj & .lib files wich contains the functions & variables u referenced in the header file. May be, u faced such problem because u've included ur header file in the project, so this file is being builded with all other files (including a files, which contains a bodies of referenced functions), so linker receives this functions twice and confuses.