빌더 님이 쓰신 글 :
: Kenzuro 님이 쓰신 글 :
: : 인터넷 검색을 통해서 C++ Builder XE에서 CPort 4.1 컴파일 했습니다.
: :
: :
http://kenzuro.tistory.com/191
: :
: : 제 블로그에 하는 방법을 정리해서 올려놨는데요. 여기서 약간의 문제가 발생하였습니다.
: :
: : TComPort를 올리고 컴파일을 해보면 EComPort 중복선언 오류가 뜹니다.
: :
: :
class DELPHICLASS EComPort;
: : class PASCALIMPLEMENTATION EComPort : public Sysutils::Exception
: : {
: : typedef Sysutils::Exception inherited;
: :
: : private:
: : int FWinCode;
: : int FCode;
: :
: : public:
: : //__fastcall EComPort(int ACode, int AWinCode);
: : //__fastcall EComPort(int ACode);
: : __property int WinCode = {read=FWinCode, write=FWinCode, nodefault};
: : __property int Code = {read=FCode, write=FCode, nodefault};
: : public:
: : /* Exception.CreateFmt */ inline __fastcall EComPort(const System::UnicodeString Msg, System::TVarRec const *Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
: : /* Exception.CreateRes */ inline __fastcall EComPort(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
: : /* Exception.CreateResFmt */ inline __fastcall EComPort(int Ident, System::TVarRec const *Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
: : /* Exception.CreateHelp */ inline __fastcall EComPort(const System::UnicodeString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
: : /* Exception.CreateFmtHelp */ inline __fastcall EComPort(const System::UnicodeString Msg, System::TVarRec const *Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
: : /* Exception.CreateResHelp */inline __fastcall EComPort(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
: : /* Exception.CreateResFmtHelp */ inline __fastcall EComPort(System::PResStringRec ResStringRec, System::TVarRec const *Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
: : /* Exception.Destroy */ inline __fastcall virtual ~EComPort(void) { }
: :
: : };
: :
: : CPort.hpp를 보면 위와 같이 선언되어 있는데요
: : //__fastcall EComPort(int ACode, int AWinCode);
: : //__fastcall EComPort(int ACode);
: :
: : 두가지를 주석처리하면 정상적으로 컴파일이 됩니다. inline 함수 선언과 충돌이 일어나는 것 같은데요. 궁금한건 이것을 주석으로 처리해도 되는지 입니다. 지금 컴파일이 잘 되더라도 코딩하다가 문제가 생기면 난감할 것 같아서 문의 드립니다. 꼭좀 도와주세요 ㅜ.ㅜ
:
:
: 이미 오버로드된 콘스트럭터 들중에 (int), (int, int) 타입의 파라미터를 갖는 콘스트럭터가 클래스 선언부에서
: 인라인으로 정의되어있기 때문에 주석으로 처리해줘야 합니다.
인라인 함수는 주석 처리 해줘도 크게 문제 없는 건가요??