Dzień dobry.
Mam spory problem - potworzyłem definicje typu strukturalnego i w dalszym ciągu kod nie jest w stanie się skompilować.
Prośba o pomoc. Język C.
Plik main.c
#include <stdio.h>
#include "additional.h"
#include "config.h"
int main(int argc, char *argv[])
{
return 0;
}
Plik config.h
#ifndef SRC_CONFIG_H_
#define SRC_CONFIG_H_
#include "additional.h"
typedef struct MyType
{
int x;
} MyOwnType_t;
#endif /* SRC_CONFIG_H_ */
Plik additional.c
#include "config.h"
void foo(MyOwnType_t x)
{
}
Plik additional.h
#ifndef SRC_ADDITIONAL_H_
#define SRC_ADDITIONAL_H_
#include "config.h"
extern void foo(MyOwnType_t x);
#endif /* SRC_ADDITIONAL_H_ */
Kompilator wyrzuca błąd:
..\Src\additional.h:13:10: error: unknown type name 'MyOwnType_t'
Pomóżcie proszę.