I have a complex C project. In a file message.h
I declare this structure
struct message
{
int err;
struct header
{
char *protocol_version;
char *type;
long int sequence_number;
} header;
struct body
{
int num_tag;
char *tag_labels[LEN];
int num_attr_tag[LEN];
char *attr_labels[LEN][LEN];
char *attr_values[LEN][LEN];
char *attr_types[LEN][LEN];
} body;
};
In the file "castfunctions.h", I include the file "message.h" and I declare the function "setClientNat"
#include <message.h>
void *setClientNat(struct message *msg);
When I compile, I have this warning
castfunctions.h:warning:
declaration of 'struct message' will not be visible outside of this function [-Wvisibility]
void *setClientNat(struct message *msg);
Can anyone help me?