1>main_display.obj : error LNK2005: "struct ALLEGRO_DISPLAY * main_display" ([email protected]@[email protected]@A) already defined in event_queue.obj
1>main.obj : error LNK2005: "struct ALLEGRO_DISPLAY * main_display" ([email protected]@[email protected]@A) already defined in event_queue.obj
1>main.obj : error LNK2005: "struct ALLEGRO_TIMER * timer" ([email protected]@[email protected]@A) already defined in event_queue.obj
1>main.obj : error LNK2005: "struct ALLEGRO_EVENT_QUEUE * event_queue" ([email protected]@[email protected]@A) already defined in event_queue.obj
1>main_timer.obj : error LNK2005: "struct ALLEGRO_TIMER * timer" ([email protected]@[email protected]@A) already defined in event_queue.obj
にこれを引き起こす可能性がありますどのような任意のアイデアを得ますか?
EDIT:
main_display.h:これらの構造は、ヘッダファイルに定義されているよう
#pragma once
#include <allegro5/allegro.h>
#include <stdio.h>
#define SCREEN_W 640
#define SCREEN_H 480
extern ALLEGRO_DISPLAY *main_display = NULL;
void display_init();
void destroy_display();
event_queue.h
#pragma once
#include <stdio.h>
#include <allegro5/allegro.h>
#include "main_timer.h"
#include "main_display.h"
extern ALLEGRO_EVENT_QUEUE *event_queue = NULL;
void event_queue_init();
void event_queue_destroy();
私は構造体を持っていない....と名前は自由である... – Vladp