Главная страница | назад





Article #16809: Using MSVC DLL's

 Question and Answer Database
FAQ1809C.txt Using MSVC DLL's
Category :Windows API
Platform :All
Product :C++Builder 1.x
Question:
I'm trying to link to an MSVC DLL in CBuilder, and i'm having
problems ... i'm getting linker errors. What do I do?
Answer:
There are many answers to this topic. All of them are correct.
What many of the other answers on this server and other places
miss, however, and the reason they may not be working for you,
is that there is _a difference in the implementation of stdcall
between the latest version of MSVC and C++Builder_ which causes
linkage to fail. IMPLIB and IMPDEF don't know about this
difference, unfortunately.
To get around it:
(1) run impdef on the .DLL.
(2) edit the .DEF file and change lines which look like:
Foo @1
to look like
_Foo=Foo
(3) run implib on this .DEF file.
(4) link to that import library.
7/2/98 10:32:32 AM

Last Modified: 01-SEP-99