multiple definition of `_bookMenu' ,重复定义的问题
bookMain.c 内容如下:#include <stdio.h>
#include "bookGlobal.h"
int main(int argc,char *argv[])
{
return 0;
}
bookFunc.c 内容如下:
#include <stdio.h>
#include "bookGlobal.h"
void moveCursor()
{
;
}
void dispTitle(void)
{
;
}
void dispMenu(void)
{
;
}
bookGolbal.h 内容如下:
#ifndef BOOKGLOBAL_H_INCLUDED
#define BOOKGLOBAL_H_INCLUDED
typedef struct book
{
char bookName[50];
char bookAuthor[20];
char bokkPress[20];
struct book *next;
}Book;
const int SCREENWIDTH = 80;
const char const *titleName[] = {"====================",
"**书籍阅读管理系统**",
"===================="};
const char const *bookMenu[] = {"1 - 全部书籍","2 - 已阅书籍","3 - 未阅书籍",
"4 - 查找书籍","4 - 添加书籍","6 - 删除书籍",
"0 - 退出"};
#endif
问题,编译出现:
multiple definition of `_bookMenu' ,重复定义的问题,怎么解决??