473,386 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Using a MS Visual C++ DLL in Borland C++ Builder

Is there any hope of using Borland Developer Studio 2006 to link in a
DLL compiled by MS Visual C++ version 6? I have a Win32 DLL from a
company named Vocera. The DLL defines C++ classes that I want to
instantiate and use. It is not COM-compliant. It came with .dll,
..lib, and .h files.

I tried using Borland C++Builder 2006, but when I add the .lib file to
my project, I get the error: "[Linker Error] Error: 'C:\VMI.LIB'
contains invalid OMF record, type 0x21 (possibly COFF)".

So then I tried using the command line utilities that came with BDS.
coff2omf (v1.0.0.74 dated 11/14/05) did generate a new .lib file but I
still get errors like "[Linker Error] Error: Unresolved external
'VMI::GetVersion()' ". coff2omf displayed the following "Internal
names" but no corresponding "Imported names":

??0VMI@@QAE@XZ
??4VMI@@QAEAAV0@ABV0@@Z
?GetVersion@VMI@@QAEPADXZ

So then I tried Implib (v3.0.22) to generate a new .lib file but still
got errors like "[Linker Error] Error: Unresolved external".

So then I tried Impdef (v3.0.22) to generate a .def file to use with
implib to create a .lib file but then got the implib error:

Name: 'vmi' Ext: '.dll' Base: 0x00000000
Name: 'VMI.DLL' Ext: '.dll' Base: 0x00000000
Error vmi.def(4): Invalid character in .DEF file

The .def file contains lines like the following, and I think implib
doesn't like the '?' characters:
_??0VMI@@QAE@XZ = ??0VMI@@QAE@XZ
; ??0VMI@@QAE@XZ

Finally, I tried ilink32 with the -Gi option to generate a .lib file
but got "Error: Error processing module C:\VMI.DLL".

I think Delphi requires a COM object to access this C++ class.

Do I need to use a Microsoft compiler/linker?

Thanks for your help!
Terry

May 31 '06 #1
1 11943
Terry wrote:
Is there any hope of using Borland Developer Studio 2006 to link in a
DLL compiled by MS Visual C++ version 6? I have a Win32 DLL from a
company named Vocera. The DLL defines C++ classes that I want to
instantiate and use. It is not COM-compliant. It came with .dll,
.lib, and .h files.

I tried using Borland C++Builder 2006, but when I add the .lib file to
my project, I get the error: "[Linker Error] Error: 'C:\VMI.LIB'
contains invalid OMF record, type 0x21 (possibly COFF)".

So then I tried using the command line utilities that came with BDS.
coff2omf (v1.0.0.74 dated 11/14/05) did generate a new .lib file but I
still get errors like "[Linker Error] Error: Unresolved external
'VMI::GetVersion()' ". coff2omf displayed the following "Internal
names" but no corresponding "Imported names":

??0VMI@@QAE@XZ
??4VMI@@QAEAAV0@ABV0@@Z
?GetVersion@VMI@@QAEPADXZ

So then I tried Implib (v3.0.22) to generate a new .lib file but still
got errors like "[Linker Error] Error: Unresolved external".

So then I tried Impdef (v3.0.22) to generate a .def file to use with
implib to create a .lib file but then got the implib error:

Name: 'vmi' Ext: '.dll' Base: 0x00000000
Name: 'VMI.DLL' Ext: '.dll' Base: 0x00000000
Error vmi.def(4): Invalid character in .DEF file

The .def file contains lines like the following, and I think implib
doesn't like the '?' characters:
_??0VMI@@QAE@XZ = ??0VMI@@QAE@XZ
; ??0VMI@@QAE@XZ

Finally, I tried ilink32 with the -Gi option to generate a .lib file
but got "Error: Error processing module C:\VMI.DLL".

I think Delphi requires a COM object to access this C++ class.

Do I need to use a Microsoft compiler/linker?

Thanks for your help!
Terry


This question is not concerned with the C++ language proper but two
particular implementations thereof. See this FAQ for what is on-topic
here and for a list of possible places to post:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

Cheers! --M

May 31 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: TGF | last post by:
I am wondering if it is feasible to use .NET for applications that have to be very fast. We have a few applications that are blazingly fast, written in Borland C++ using Borland C++ Builder. We...
3
by: Miguel Angel Polo | last post by:
Hi Maybe this question is off-topic, but anyway I've seen some questions about Builder and Visual, so here it is: How can I use an OpenGL component?? Where can I find it??
17
by: Ziggi | last post by:
Hi. I want to get a C++ IDE, but I dont know whether to go for Bill Gate's solution or Borland's. Could any kind folks detail the relative strength and weaknesses of both, and also tell me which...
15
by: Chris | last post by:
I am just beginning programming again and need a bit of advice. I have both Visual C++ 6.0 Standard Edition and Borland C++ Builder 6. Of these two which do you consider the best for programming...
9
by: Christo | last post by:
hey im a student about to start a course in c++ at uni, we have been told to obtain a copy of borland c++ 5.01 (not c++ builder) this is just a program with a compiler/linker and development...
6
by: Verne | last post by:
Can anyone tell me where to look for some sample code programs for simple window developement by Builder 6 C++. I know the C++ fairly well but tryint to understand and learn how to use the...
22
by: smartwolf agassi via DotNetMonster.com | last post by:
I'm a C# language learner. I want to know which IDE is better for C# programing, Borland C#Builder or VS.net 2003? -- Message posted via http://www.dotnetmonster.com
6
by: TGF | last post by:
I am wondering if it is feasible to use .NET for applications that have to be very fast. We have a few applications that are blazingly fast, written in Borland C++ using Borland C++ Builder. We...
0
by: sales | last post by:
I am glad to present to the community of this group the new version of our component intended for visual building of SQL queries via an intuitive interface - Active Query Builder...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.