In general, binary compatibility between objects
created by different compilers is not assured.
C++ certainly does not guarantee that kind of
compatibility.
That said, your tools provide ways around the
problem. Look at docs for the linker and the
library creation options of the compiler(s).
You could also try Microsoft or Borland specific
newsgroups.
--Larry Brasfield
Above opinions may be mine alone.
(Humans may reply at unundered larry_br@sea_net.com )
1) Use the Borland IMPDEF.EXE to create a DEF file from your DLL.
2) Use MSVC's LIB.EXE program to build an IMPORT library from the DEF file
created.
3) Link in this import library to your application.
At this point you may encounter linking problems (it depends upon the
Borland DLL's calling convention. If its cdecl then you should have no
problems. If its stdcall you'll have linker errors. Follow the following
steps to properly "map" the functions from MSVC expected stdcall syntax from
Borland's stdcall syntax.
Modify the Borland built DEF file by hand as follows:
<MSVC expected function name> = <Borland DEF file function name> <ordinal
value>
for example,
Borland.DEF file:
function1 @2
function2 @3
MSVC errors : unresolved functions
function1@32
function1@16
ModifyDEF file to map functions:
function1@32 = function1 @2
function1@16 = function2 @3
... etc...
Ciao!
Jim Shaw
roshini wrote in message <35CDF273...@ee.tamu.edu>...
>I am trying to import a function from a dll written in borland C++ in my
>Visual C++ project.I included the library and the header file which has
>the import dll statements , to the project but get a linker error saying
>the lib file is corrupt or invalid(errorno LNK1136).