Let me edit the question: The files are:
file1.h
file1.c
file3.h
file2.h
file2.c
file4.h
file5.h
main_code.cpp
file1.h
#include "file3.h"
typedef struct{} Str1;
void func1(Str1 *str1);
void func2(Str1 *str1);
file1.c
#include "file3.h"
#include "file1.h"
#include "file2.h"
#include <stdio.h>
#include <math.h>
void func1(Str1 *str1){}
void func2(Str1 *str1){}
file2.h
#include "file3.h"
#include "file1.h"
file2.c
#include "file3.h"
#include "file1.h"
#include "file2.h"
#include <stdio.h>
#include <math.h>
file3.h
Doesnt include others.
file4.h
#include "file1.h"
#include "file2.h"
#include "file5.h"
file5.h
#include "file3.h"
main_code.cpp
#include "file1.h"
#include "file2.h"
#include "file4.h"
#include "file5.h"
func1(variable)
func2(variable)
The erro "LNK2001: unresolved external symbol" happen with func1 and func2 so I didnt place what functions the others have. I already tried placing the include in the "extern C" but didnt work. And if I add to main_code.cpp
#include "file1.c"
Then the program works...