Cześć, nie mogę sobie poradzić z strukturą w pliku nagłówkowym. Tak mi się wydaje, że to tam leży problem.
funkcje.h
struct komunikat
{
long int typ;
char text[MAX_TEXT];
};
void dostales_wiad(int, struct komunikat*, int);
void wyslij_wiad(int, struct komunikat*);
funkcje.c
#include "funkcje.h"
void dostales_wiad(int kolejka, komunikat* wiad, int r)
{
int blad = msgrcv(kolejka, wiad, max_rozmiar, r, 0);
}
void wyslij_wiad(int kolejka, komunikat* wiad)
{
int blad = msgsnd(kolejka, &wiad, max_rozmiar, 0);
}
wywala blad
make all
gcc -o klient.out klient.c -lm
In file included from funkcje.h:4:0,
from klient.c:10:
funkcje.c:27:33: error: unknown type name ‘komunikat’
void dostales_wiad(int kolejka, komunikat* wiad, int r)
^
In file included from funkcje.h:4:0,
from klient.c:10:
funkcje.c:33:31: error: unknown type name ‘komunikat’
void wyslij_wiad(int kolejka, komunikat* wiad)
^
makefile:7: polecenia dla obiektu 'klient' nie powiodły się
make: *** [klient] Błąd 1
Z góry dziękuję za pomoc.