C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[53871] C++ Builder 2006에서 TIdTPCserver 적용하여 컴파일시 에러가 발생합니다.
기둥 [] 2149 읽음    2008-07-09 15:51
C++ Builder은 어제 처음으로 접해본 왕초보입니다.
C 형태의 콘솔용 작업만 해와서 GUI도 왕초보입니다.
지금 임의의 데이터를 통해서 통해서 받아서 Tchart를 이용해서 그림을 그리는 프로그램을 작성하려고 합니다.
데이터를 보내 줄 프로그램을 TIdTPCclient를 이용하고 받을 프로그램을 TIdTPCserver을 이용하려고 합니다.
그래서 일단 먼저 TIdTPCserver을 이용해서 프로그램을 작성하려고 하는데,
시험 삼아서
폼에 TIdTPCserver로 올려놓고 들어 오는 문자열를 그래도 화면에 뿌려 주는 프로그램을 작성했는데,
컴파일 하면서 에러가 나옵니다.
일단 작성한 코드는
//$$---- Form CPP ----
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "IdCustomTCPServer"
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::IdTCPServer1Execute(TIdContext *AContext)
{
    AnsiString stTemp=Acontext->Connection->ReadLn();
    Acontext->Connection->WriteLn(stTemp)
}
//---------------------------------------------------------------------------
void __fastcall TForm2::IdTCPServer1AfterBind(TObject *Sender)
{

}
//---------------------------------------------------------------------------
입니다.

컴파일 에러가 나는 곳은 헤더 화일로

//$$---- Form HDR ----
//---------------------------------------------------------------------------

#ifndef Unit2H
#define Unit2H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "IdCustomTCPServer.h"
#include <IdBaseComponent.hpp>
#include <IdComponent.hpp>
#include <IdTCPServer.hpp>
//---------------------------------------------------------------------------
class TForm2 : public TForm
{
__published:    // IDE-managed Components
    TIdTCPServer *IdTCPServer1;
    void __fastcall IdTCPServer1Execute(TIdContext *AContext);
private:    // User declarations
public:        // User declarations
    __fastcall TForm2(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm2 *Form2;
//---------------------------------------------------------------------------
#endif
에서 #include "IdCustomTCPServer.h"에서 에러가 나옵니다.

에러 메세지는 다음과 같습니다.
[C++ Error] Unit2.h(11): E2209 Unable to open include file 'IdCustomTCPServer.h'
[C++ Error] Unit2.h(12): E2209 Unable to open include file 'IdBaseComponent.hpp'
[C++ Error] Unit2.h(13): E2209 Unable to open include file 'IdComponent.hpp'
[C++ Error] Unit2.h(14): E2209 Unable to open include file 'IdTCPServer.hpp'
[C++ Error] Unit2.h(19): E2303 Type name expected
[C++ Error] Unit2.h(19): E2139 Declaration missing ;
[C++ Error] Unit2.h(20): E2293 ) expected
[C++ Error] Unit2.h(19): E2109 Not an allowed type
[C++ Error] Unit2.cpp(19): E2147 'TIdContext' cannot start a parameter declaration
[C++ Error] Unit2.cpp(20): E2316 '_fastcall TForm2::IdTCPServer1Execute(int *)' is not a member of 'TForm2'

IdCustomTCPServer.h을 못찾는 가 해서  IdCustomTCPServer.h의 위치를 path 지정을 해놓았는데도 안되는 군요.

여러 고수님들의 많은 도움 부탁 드립니다.
감사합니다.

+ -

관련 글 리스트
53871 C++ Builder 2006에서 TIdTPCserver 적용하여 컴파일시 에러가 발생합니다. 기둥 2149 2008/07/09
53890     자답입니다. 기둥 1825 2008/07/10
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.