Board index » cppbuilder » Need Info on Libraries Built with MS .Net and linked to in BCB6

Need Info on Libraries Built with MS .Net and linked to in BCB6


2003-08-29 05:31:54 AM
cppbuilder109
Is there a document out there that explains all the pitfalls with
linking to DLLs using BCB6? We are building some application frameworks
that need to be used by BCB6 and Visual Studio .Net (mayber even Visuall
C++ 6) developers. We would like to be able to provide both static
object libraries and dynamic link libraries to developers using either
environment.
Here's my understanding of this topic...
Static object libraries are vendor-specific. Borland uses the OMF
format and MS uses the COFF format. Borland supplies the COFF2OMF
utility that we have successfully used in the past to convert static
object libraries received from third-party vendors that tell you you
"can't" use this in anything bu Visual C++. We've had good success over
the years with this utility, although there are times when it doesn't
properly convert the library... any info on this topic would be
appreciated.
A DLL is a DLL regardless of what compiler/linker was used as it is a
binary standard. Borland's implib will accept a DLL (shouldn't matter
whose it is) and generate an import library (to be included in your
project), which is simply a mapping of entry points into the DLL. We
are exporting classes and that involves name mangling. The DLL header
should place the appropriate export keyword in the class declaration
when building the DLL and an import keyword when linking to the DLL. We
have not been able to make this work; the BCB linker says the class
references are unresolved. I thought the issue is tied to name mangling
but I haven't been able to confirm it for sure. We've tried "Extern "C"
{}" and also exporting simple C functions but that doesn't work either.
Can anyone offer any insight here or better yet a reference to a
document?
Thanks in advance.
XXXX@XXXXX.COM
 
 

Re:Need Info on Libraries Built with MS .Net and linked to in BCB6

"James R. Brown" < XXXX@XXXXX.COM >wrote in message
Quote
Is there a document out there that explains all the pitfalls with
linking to DLLs using BCB6? We are building some application
frameworks that need to be used by BCB6 and Visual Studio
.Net (mayber even Visuall C++ 6) developers. We would like
to be able to provide both static object libraries and dynamic
link libraries to developers using either environment.
Using Visual C++ DLLs in a C++Builder Project
www.bcbdev.com/articles/vcdll.htm
Visual C++ DLLs Part 2: C++ Classes
www.bcbdev.com/articles/vcdll2.htm
Creating DLLs in BCB that can be used from Visual C++
www.bcbdev.com/articles/bcbdll.htm
Gambit
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03