M
Mark Hobley
I have created header file buffers.h as follows:
struct buffertablestru {
char *addr;
int numbuffers;
};
extern buffertablestru buffertable;
When included in a file, this is supposed to tell programs that there is an
external variable buffertable with a structure of buffertablestru.
The program buffers.c is provides the variable buffertable, which can then
be accessed by other modules:
#include "buffers.h"
buffertablestru buffertable; /* Define the variable buffertable */
int main() {
/* blah blah blah */
}
For some reason I am getting a compiler error, when I attempt to compile
buffers.c:
In file included from buffers.c:1:
buffers.h:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'buffertable'
buffers.c:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'buffertable'
What is wrong here?
Mark.
struct buffertablestru {
char *addr;
int numbuffers;
};
extern buffertablestru buffertable;
When included in a file, this is supposed to tell programs that there is an
external variable buffertable with a structure of buffertablestru.
The program buffers.c is provides the variable buffertable, which can then
be accessed by other modules:
#include "buffers.h"
buffertablestru buffertable; /* Define the variable buffertable */
int main() {
/* blah blah blah */
}
For some reason I am getting a compiler error, when I attempt to compile
buffers.c:
In file included from buffers.c:1:
buffers.h:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'buffertable'
buffers.c:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'buffertable'
What is wrong here?
Mark.