So to simplify, let's say I have a Page.h file with the following...
#ifndef PAGE_H
#define PAGE_H
typedef struct Pgmap{
int test;
}Page;
void printPage();
#endif
Where the Page.c defines printPage() and has...
#include "Page.h"
And, I have another .c/.h pair of files that use the struct/function above.
In the Test.h I...
#include "Page.h"
, and my Test.c has
#include "Test.h"
At this point I can use my Page struct, but when I try to use printPage() I get an "undefined reference to 'printPage()' error when I try to compile.
So why is it that my includes work for the struct, but not the functions? If it makes any difference my gcc is gcc(SUSE Linux) 4.6.2