|
안녕하세요.
저는 2개의 폼과 3개 클래스를 사용하는 PG 를 하나 만들었습니다.
그런 다음 전역으로 헤더 GlobalVar.h 라는 놈을 하나 만들어서 전역변수를 관리합니다.
문제는 두개의 폼인데...
하나는 gxApp.h 이고 하나는 Login.h 입니다. Login.h 는 gxApp의 멤버 변수를 사용합니다.
즉, gxApp.h 에는
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ScktComp.hpp>
#include <mmsystem.h>
#include "gxPacket.h"
#include "gxAudioDef.h"
#include "gxAudio.h"
#include <ComCtrls.hpp>
#include <ImgList.hpp>
#include <ExtCtrls.hpp>
#include "RXSplit.hpp"
gxApp.cpp 에는,
#include "GlobalVar.h"
#include "gxDef.h"
#include "gxApp.h"
#include "gxLogin.h"
#include "stdio.h"
gxLogin.h 에는,
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
gxLogin.cpp 에는
#include "GlobalVar.h"
#include <stdio.h>
#include "gxDef.h"
#include "gxLogin.h"
#include "gxApp.h"
.
.
.
.
이런 식으로 중복되는 것이 있는데...
실행에는 아무 문제가 없습니다.
근데 링크시 warnning 이 약 90~120 개가 나니.... 컴파일 warnning 은 9개 정도인데....나머진 다..링크...
에러 메세지는 다음과 같습니다.
[Linker Warning] Public symbol '_g_ServerName' defined in both module C:\프로젝트\PG\GXAPP.OBJ and C:\프로젝트\PG\GXLOGIN.OBJ
[Linker Warning] Public symbol '_SendThread_CreateCheck' defined in both module C:\프로젝트\PG\GXAPP.OBJ and C:\프로젝트\PG\GXAUDIO.OBJ
등입니다.
이런게 100여개...
g_ServerName 은 GlobalVar에서 선언된 놈입니다.
혹시...
아시는분 계시면 답좀 부탁드립니다.
너무 장문인데.. 읽어주셔서 감사합니다.
|