Board index » cppbuilder » Using DLLs, implib

Using DLLs, implib

Hello Everyone.

I'm trying to use a DLL that I complied with MS Visual C++ 6. I ran
implib on the dll and created an import library and added it to my
project (I'm using BCB 3). However, when I try to link my project I get
an error saying that the functions (which are in the dll) were not
found. I looked through the help and I did everything it said, but still
get the same error. Any suggestions?

Thanks in advance,

Mike Lewis
mile...@bu.edu

 

Re:Using DLLs, implib


-Enable a detailed map file with mangled names and make
the project again.
-Run IMPDEF on the DLL to create a *.DEF file

Compare the symbols which generated errors in the map
file to the corresponding exported symbols from the DLL
as listed in the DEF file.  My guess is that you have
just declared the names in the source code and they are
being mangled in the C++ fashion and don't match the
exported names.  Using extern "C" in front of the function
prototype will make it be named as a C function without
mangling.

DO NOT POST A MESSAGE IN MULTIPLE NEWS GROUPS.
POST IT =>only<= IN THE ONE WHICH MOST RELATES TO
THE SUBJECT OF THE MESSAGE.

  Ed

Re:Using DLLs, implib


Dear Michael R. Lewis,

Be sure the DLL is a 32-bit DLL and not a 16-bit DLL.

Use 'tdump' to find out about the DLL and be sure the DLL flags state that
it is an "executable 32-bit library".

Good Luck,
James Kosin

PS: tdump will tell you alot about the DLL.  Even your executables.

Michael R. Lewis <mile...@bu.edu> wrote in message
news:371E43C2.AA8F203@bu.edu...

Quote
> Hello Everyone.

> I'm trying to use a DLL that I complied with MS Visual C++ 6. I ran
> implib on the dll and created an import library and added it to my
> project (I'm using BCB 3). However, when I try to link my project I get
> an error saying that the functions (which are in the dll) were not
> found. I looked through the help and I did everything it said, but still
> get the same error. Any suggestions?

> Thanks in advance,

> Mike Lewis
> mile...@bu.edu

Re:Using DLLs, implib


Quote
Michael R. Lewis wrote in message <371E43C2.AA8F...@bu.edu>...
>Hello Everyone.

>I'm trying to use a DLL that I complied with MS Visual C++ 6.

You might want to read the article at

http://www.bcbdev.com/articles/vcdll.htm

Harold Howe [TeamB]
http://www.bcbdev.com

Other Threads