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
[20772] Re:[질문] BCB에서 만든 Dll을 VC++에서 부를시에
이상민 [smleelms] 1027 읽음    2002-08-13 01:56
일단 첫번째 문제의 해결책은 찾은것 같네요..

http://www.bcbdev.com/articles/bcbdll.htm 에 있는 글의 일부입니다.

Technique 4: Implicit linking with __stdcall functions
------------------------------------------------------------------------------
1- Use the __stdcall calling convention when building your DLL.
2- Export plain "C" functions. No C++ classes or member functions.
3- Make sure you have an extern "C" {} around your function prototypes.
4- Create an import library for MSVC. This is the difficult part. You cannot
   create an import library for __stdcall functions with LIB.EXE. You must
   create the import library by compiling a dummy DLL in MSVC. To do so,
   follow these steps:
     4a- Create a non-MFC DLL project with MSVC
     4b- Copy over your DLL header file and DLL source code from BCB
     4c- Edit your DLL source code and rip out the function bodies of each
         routine. Use dummy return statements in routines that return values.
     4d- Configure the MSVC project to generate a DLL with the same file name
         as the BCB DLL.
     4e- Add a DEF file to the MSVC project to suppress its hoaky __stdcall
         name decorations (_Foo@4)
5- Compile the dummy DLL project from step 4. This will generate a DLL (which
   you can pitch in the trash) and a LIB file (which you need).
6- Add the LIB file from step 5 to any MSVC project the needs to call the BCB
   DLL. The LIB file will satisfy the linker. Deploy the MSVC executable with
   the BCB DLL (not the dummy DLL).


문서 제목은 "Creating DLLs in BCB that can be used from Visual C++" 이구요..
내용은 다음과 같네요..

-Introduction: why is this so difficult
-Summary of guidelines
-Example 1: Implicit linking
-Example 2: Explicit linking
-Example 3: Implicit linking with a #define kludge
-Example 4: Implicit linking with stdcall functions
-Conclusion


웅.. Dll로 만들어서 다른 사람에게 줘야 되는뎅... 이렇게 어려워서야 ㅡ.ㅡ;;
하는수 없네요.. 그냥 VC++에서 Dll로 만들어야 겠네요..
그리고, 위의 사항은 일단 급한 불부터 끄고.. 나중에 생각해봐야겠네요.. 에휴~

+ -

관련 글 리스트
20765 [질문] BCB에서 만든 Dll을 VC++에서 부를시에 이상민 1123 2002/08/12
20772     Re:[질문] BCB에서 만든 Dll을 VC++에서 부를시에 이상민 1027 2002/08/13
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.