So I have an include guard on this header file, but it doesn't seem to be working....
For some reason it's not working. I include heap.h in file1.c, and then again in file2.c, but when I compile it all, it's giving me linking errors saying that all the functions were already defined in file1.objCode:#ifndef __HEAP_H_ #define __HEAP_H_ ........some structs....... .....some functions....... #endif /* __HEAP_H_ */
To be exact:
Any thoughts?1>Linking...
1>os345p2.obj : error LNK2005: _heap_init already defined in os345.obj
1>os345p2.obj : error LNK2005: _heap_isEmpty already defined in os345.obj
1>os345p2.obj : error LNK2005: _heap_isFull already defined in os345.obj
1>os345p2.obj : error LNK2005: _heap_heapify already defined in os345.obj
1>os345p2.obj : error LNK2005: _heap_addItem already defined in os345.obj
1>os345p2.obj : error LNK2005: _heap_extractMax already defined in os345.obj
1>os345p2.obj : error LNK2005: _heap_extractNode already defined in os345.obj