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

델파이 Q&A
Delphi Programming Q&A
[14057] Re:Delphi XE2 컴포넌트 구합니다.[Port,기타]
수연 [azuramos] 3801 읽음    2012-01-19 04:14
이렇게 한 번 해 보세요
아래 debug은 에러 날때 해결책입니다.

*** Installation ****
1. Remove all previously installed files of ComPort Library (TComPort component)

2. Create a new folder under Delphi directory and extract "Sources" zip file into new folder.
   (eg) ...\TComPort\4.11c
   Add to the Library Path the new ComPort folder.
   (Tools -> Options -> Environment Options -> Delphi Options -> Library -> Library Path)

3. File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file

4. Project -> Options -> Delphi compiler
   : set Search path:  ...\TComPort\4.11c
        C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\lib\win32\release

5. Project -> compile all project

6. File -> Cloase All ----> No NOT SAVE!!!

7. Repeat 4,5,6 ...\TComPort\4.11c\DsgnCPortDXE.dpk

8. copy C:\Users\Public\Documents\RAD Studio\9.0\Bpl\*.bpl files
   into ...\TComPort\4.11c\DebugX    <== if not

   copy ...\TComPort\4.11c\DebugX\*.bpl
   into C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin


9. Component -> Install Package -> Add "DsgnCPortDXE.bpl"  => ComPort Library Delphi XE


----------------------------------------------------- for Debug.
Borland CPort multiple declaration and Unresolved linker SetPortA function

[C++ Error] CPort.hpp(686): E2238 Multiple declaration for '_fastcall EComPort::EComPort(int)'
[C++ Error] CPort.hpp(677): E2344 Earlier declaration of '_fastcall EComPort::EComPort(int)'
[C++ Error] CPort.hpp(698): E2238 Multiple declaration for '_fastcall EComPort::EComPort(int,int)'
[C++ Error] CPort.hpp(676): E2344 Earlier declaration of '_fastcall EComPort::EComPort(int,int)'
[C++ Error] FrmMain.cpp(168): E2277 Lvalue required

====> comment out the CPort.hpp lines 686 and 698



------------------------------ for Debug.
[Linker Error] Error: Unresolved external '__fastcall Cport::TCustomComPort::SetPortA(const System::AnsiString)' referenced from C:\SRC\C\YOUR_SOURCE.OBJ
The solution to this one is to add the following to your projects conditional defines


====> Edit C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\include\windows\sdk\winspool.h
      C:\Program Files (x86)\CodeGear\RAD Studio\5.0\include

#ifdef DONT_USE_WINSPOOL_SETPORTA  //====> add !!!
BOOL
WINAPI
SetPortA(
__in_opt    LPSTR     pName,
__in        LPSTR     pPortName,
            DWORD       dwLevel,
__in        LPBYTE      pPortInfo
);
BOOL
WINAPI
SetPortW(
__in_opt    LPWSTR     pName,
__in        LPWSTR     pPortName,
            DWORD       dwLevel,
__in        LPBYTE      pPortInfo
);
#ifdef UNICODE
#define SetPort  SetPortW
#else
#define SetPort  SetPortA
#endif // !UNICODE

#endif // !DONT_USE_WINSPOOL_SETPORTA //====> add !!!




Andres 님이 쓰신 글 :
: 안녕하세요,
:
: 현재 Delphi XE2 툴로 개발을 진행하고 있습니다.
: 처음 접해보는 툴이라 많이 생소합니다.
:
: 개발중인 프로그램에 COM,LPT 포트를 사용(프린터)해야 하는 기능이 있는데요.
: 관련 자료를 델마당에 검색해보니 comport411f 라는 컴포넌트를 SOURCEFORGE 사이트에서
: 다운하였습니다만 설치방법이 잘못된건지 컴포넌트가 생성이 되질않네요.
: 혹시라도 설치방법을 알고계신다거나 기타 호환되는 컴포넌트를 가지고 계신 분께서
: 공유해주십사 합니다.
: 또한, 기본컴포넌트를 제외한 기타 무료 컴포넌트(BAR,PANEL 등등)도 공유해주시면 감사하겠습니다.
:
: andres8404@live.com
:
: 부탁드립니다. 감사합니다.

+ -

관련 글 리스트
14053 Delphi XE2 컴포넌트 구합니다.[Port,기타] Andres 1971 2012/01/13
14057     Re:Delphi XE2 컴포넌트 구합니다.[Port,기타] 수연 3801 2012/01/19
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.