0

I am programming a 80c51 chip and I have a bucketload of functions as well as define statements. I am working with in the mcu 8051 ide. I want these functions and these defines in a separate header file but I don't know what I must type in the header file. currently I only have the defines and functions and that's it.

I also do not know how to include it when I put it in my application's folder. I simply use the include statement in my program,

#include <at89x51.h> // needed for the ucontroller
#include <communication_functions.h>

but it cannot find it. How do I tell the program to look for the .h in it's own folder?

Jabberwocky
  • 48,281
  • 17
  • 65
  • 115
bask185
  • 377
  • 1
  • 3
  • 12

1 Answers1

-1

First you need to create a C header file(myheader.h) where you put your function's definition .And then,create a C file(myheader.c),where you are supposed to rewrite the function defined in the myheader.h file.Finally,use #include "myheader.h" before you use your own function which is in the myheader.h file.

Strike
  • 1
  • 2