Quote:
Originally Posted by graemef
Well "previous declaration" errors normally mean that you are including the header file too many times.
|
Or maybe it could be defined in the header file and again in the C file. If graemef is right, try wrapping your .h file in an ifndef macro, like:
Code:
#ifndef _MY_1394_H
#define _MY_1394_H
... /* defs go here */
#endif
If it's the latter problem (redefined in .c file; it looks from your errors that this is the case) then only use the C file for the implementation, not the definition. For example, function definitions like
go in the header and function implementations like
Code:
void foo(int x) {
printf("%d\n", x);
}
go in the C file.