C,原型中函数的多重定义

-1 c prototyping function definition

Eclipse告诉我,我有一个函数的mutliple定义.我只是无法发现错误.这是我的main.c

#include <stdio.h>
#include "kontaktverzeichnis.h"


int main(){

    kontakt_hinzufuegen();

    return 0;
}
Run Code Online (Sandbox Code Playgroud)

这是标题:

#ifndef KONTAKTVERZEICHNIS_H_
#define KONTAKTVERZEICHNIS_H_
#include "kontaktfunktionen.c"

int kontakt_hinzufuegen();


#endif /* KONTAKTVERZEICHNIS_H_ */
Run Code Online (Sandbox Code Playgroud)

这是kontaktfunktionen.c

#include <stdio.h>

kontakt[];


kontakt_hinzufuegen(){
int i = 0;
printf("Bisher sind %i Kontakte angelegt.",kontakt[i]);

    kontakt[i++];

}

struct kontaktname{
    char* name;
    char* vorname;
};

struct kontaktanschrift{
    char* strasse;
    int hausnummer;
    int plz;
    char* ort;
    char* land;

};
Run Code Online (Sandbox Code Playgroud)

我的错误在哪里?

unw*_*ind 5

您不应该使用#includeC文件,这不是组织代码的正确方法.

您应该单独编译C文件,然后将它们链接在一起,或者使用单个编译器调用一次编译它们.