Re: Export C++ class from a Borland DLL and use it in Microsoft VC
- From: Markus Donath <news1589@xxxxxxxxxxxxx>
- Date: Fri, 29 Sep 2006 16:14:51 +0200
Bruno van Dooren [MVP VC++] wrote:
I'm new of this group and I do not know if this is the correct group
for my question.
I have a DLL with its export library (.lib) wrote in Borland C++ 6. In
borland everything is OK and I am able to include the lib and use the
class that i have exported creating an instance with new etc... I
would like to export this class in microsoft VC++ using the same .lib
file. Obviously it doesn' t work.
Is it possible to generate or convert the import library into a
compatible format?
Nope.
There is no binary standard for compiled C++ code. Each compiler uses its own binary layout.
This means that C++ code is incompatible between different compilers, and even different compiler version.
Using Borland C++ dlls in msvc is not possible.
I think, that's not true. For example, I use a DLL written in Intel Fortran with Borland C++. IMHO DLL-usage is compiler - and even though - language independant. If it really doesn't work with the MS compiler (I did not do this), it is in fact a Microsoft problem.
Markus
This is not a Microsoft problem btw. It is true for all compilers. Microsoft even has a very good record for compatibility, gcc the worst..
If you want to export C++ code you have to stick with 1 compiler.
If you want to mix different compiler environments, you have to stay with ANSI C interfaces.
- Follow-Ups:
- Re: Export C++ class from a Borland DLL and use it in Microsoft VC
- From: William DePalo [MVP VC++]
- Re: Export C++ class from a Borland DLL and use it in Microsoft VC
- From: Bruno van Dooren [MVP VC++]
- Re: Export C++ class from a Borland DLL and use it in Microsoft VC
- References:
- Export C++ class from a Borland DLL and use it in Microsoft VC
- From: Fabry
- Re: Export C++ class from a Borland DLL and use it in Microsoft VC
- From: Bruno van Dooren [MVP VC++]
- Export C++ class from a Borland DLL and use it in Microsoft VC
- Prev by Date: reading in a file
- Next by Date: Re: reading in a file
- Previous by thread: Re: Export C++ class from a Borland DLL and use it in Microsoft VC
- Next by thread: Re: Export C++ class from a Borland DLL and use it in Microsoft VC
- Index(es):
Relevant Pages
|