”error LNK2001: 外部シンボル~ は未解決です。”というエラーについて
Posted: 2009年5月20日(水) 09:34
こんにちは。いつもこちらのサイトにはお世話になっています。
龍神録のプログラムを基にして、シューティングゲームを制作しているのですが、
GV.h内に
GLOBAL int img_item[3][3];
GLOBAL int img_point_item[3][3];
GLOBAL int point_item_t point_item[POINT_ITEM_MAX];
という配列を定義したところ、
calc.obj : error LNK2001: 外部シンボル ""struct point_item_t * point_item" (?point_item@@3PAUpoint_item_t@@A)" は未解決です。
ini.obj : error LNK2001: 外部シンボル ""struct point_item_t * point_item" (?point_item@@3PAUpoint_item_t@@A)" は未解決です。
out.obj : error LNK2001: 外部シンボル ""struct point_item_t * point_item" (?point_item@@3PAUpoint_item_t@@A)" は未解決です。
graph.obj : error LNK2001: 外部シンボル ""struct point_item_t * point_item" (?point_item@@3PAUpoint_item_t@@A)" は未解決です。
load.obj : error LNK2001: 外部シンボル ""int (* img_item)[3]" (?img_item@@3PAY02HA)" は未解決です。
graph.obj : error LNK2019: 未解決の外部シンボル "int (* img_item)[3]" (?img_item@@3PAY02HA) が関数 "void __cdecl graph_point_item(void)" (?graph_point_item@@YAXXZ) で参照されました。
load.obj : error LNK2001: 外部シンボル ""int (* img_point_item)[3]" (?img_point_item@@3PAY02HA)" は未解決です。
D:\stg\project\pla.pla\Debug\PlaPla.exe : fatal error LNK1120: 外部参照 3 が未解決です。
というエラーが出るようになりました。
何度も解決を試みたのですが、他の配列(GLOBAL enemy_t enemy[ENEMY_MAX]; など)と何が違うのか、何が原因なのかさっぱり分かりません。
どなたか分かる方がおられましたら、ご教授お願いします。
龍神録のプログラムを基にして、シューティングゲームを制作しているのですが、
GV.h内に
GLOBAL int img_item[3][3];
GLOBAL int img_point_item[3][3];
GLOBAL int point_item_t point_item[POINT_ITEM_MAX];
という配列を定義したところ、
calc.obj : error LNK2001: 外部シンボル ""struct point_item_t * point_item" (?point_item@@3PAUpoint_item_t@@A)" は未解決です。
ini.obj : error LNK2001: 外部シンボル ""struct point_item_t * point_item" (?point_item@@3PAUpoint_item_t@@A)" は未解決です。
out.obj : error LNK2001: 外部シンボル ""struct point_item_t * point_item" (?point_item@@3PAUpoint_item_t@@A)" は未解決です。
graph.obj : error LNK2001: 外部シンボル ""struct point_item_t * point_item" (?point_item@@3PAUpoint_item_t@@A)" は未解決です。
load.obj : error LNK2001: 外部シンボル ""int (* img_item)[3]" (?img_item@@3PAY02HA)" は未解決です。
graph.obj : error LNK2019: 未解決の外部シンボル "int (* img_item)[3]" (?img_item@@3PAY02HA) が関数 "void __cdecl graph_point_item(void)" (?graph_point_item@@YAXXZ) で参照されました。
load.obj : error LNK2001: 外部シンボル ""int (* img_point_item)[3]" (?img_point_item@@3PAY02HA)" は未解決です。
D:\stg\project\pla.pla\Debug\PlaPla.exe : fatal error LNK1120: 外部参照 3 が未解決です。
というエラーが出るようになりました。
何度も解決を試みたのですが、他の配列(GLOBAL enemy_t enemy[ENEMY_MAX]; など)と何が違うのか、何が原因なのかさっぱり分かりません。
どなたか分かる方がおられましたら、ご教授お願いします。