473,698 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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::GetVersio n()' ". 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 11983
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::GetVersio n()' ". 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
2127
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 would like to port over to ..NET, but some of the test models we have developed are MUCH, MUCH slower than it's Borland counterpart. Is this due to the .NET Framework and the JIT? Or is it something we should be looking for in the project...
3
1992
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
4697
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 you yourselves prefer. Thanks in advance. Ziggi
15
3763
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 windows programs (not the DOS style program). I have had a quick look at both of these and Borland seems to have a lot more components (Buttons, Forms etc) than Microsoft Visual C++. Does Visual C++ have these components easily accesable. Chris.
9
4865
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 environment. it is simply called borland c++ 5.01 can anyone tell me where i can download either a free copy or a copy that needs registering or someething, i can only find c++ builder which is totally different from the program i have seen in...
6
2872
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 Enterprise edidtion of Builder 6 by Borland. Please. Verne
22
2226
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
2372
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 would like to port over to ..NET, but some of the test models we have developed are MUCH, MUCH slower than it's Borland counterpart. Is this due to the .NET Framework and the JIT? Or is it something we should be looking for in the project...
0
1994
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 (http://www.activequerybuilder.com/). It has full support for MS SQL Server dialect starting from version 7 to 2005. Active Query Builder can be used in different development environments. Today our visual component is availiable in the following editions:...
0
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9027
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2329
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.