473,386 Members | 1,835 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.

Importing Borland DLL to MSVC++

Dear list,

I have a Dll it's .h and .lib files which have been compiled under Borland.

I followed the steps indicated to transform the lib to a lib file
readable by MSVC++

IMPDEF.EXE test.def test.dll
link /lib /def:test.def
The lib file is now accepted by the compiler. But I still get
unreferenced error link like this one

error LNK2001: unresolved external symbol "__declspec(dllimport) public:
bool __thiscall MyClass::IFC(void)" (__imp_?IFC@MyClass@@QAE_NXZ)

I searched all over google, and only found cases were there is a number
after the @ sign, but could not figure out what to do with this. I also
checked the MS KB q131313 article but it didn't create a valid lib file
(the functions were missing)

can anybody give me a hint please ?

Yours

Alex
Jan 26 '06 #1
3 3625
Alex wrote:
Dear list,

I have a Dll it's .h and .lib files which have been compiled under Borland.

I followed the steps indicated to transform the lib to a lib file
readable by MSVC++

IMPDEF.EXE test.def test.dll
link /lib /def:test.def
The lib file is now accepted by the compiler. But I still get
unreferenced error link like this one

error LNK2001: unresolved external symbol "__declspec(dllimport) public:
bool __thiscall MyClass::IFC(void)" (__imp_?IFC@MyClass@@QAE_NXZ)

I searched all over google, and only found cases were there is a number
after the @ sign, but could not figure out what to do with this. I also
checked the MS KB q131313 article but it didn't create a valid lib file
(the functions were missing)

can anybody give me a hint please ?


You should ask this question in a Microsoft-specific newsgroup since it
is beyond the scope of standard C++. See this FAQ for what is on-topic
here and for some suggestions of where to post:

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

Cheers! --M

Jan 26 '06 #2
On Thu, 26 Jan 2006 14:44:37 +0100, Alex
<al***************@physics.unige.ch> wrote:
Dear list,

I have a Dll it's .h and .lib files which have been compiled under Borland.

I followed the steps indicated to transform the lib to a lib file
readable by MSVC++

IMPDEF.EXE test.def test.dll
link /lib /def:test.def
The lib file is now accepted by the compiler. But I still get
unreferenced error link like this one

error LNK2001: unresolved external symbol "__declspec(dllimport) public:
bool __thiscall MyClass::IFC(void)" (__imp_?IFC@MyClass@@QAE_NXZ)

I searched all over google, and only found cases were there is a number
after the @ sign, but could not figure out what to do with this. I also
checked the MS KB q131313 article but it didn't create a valid lib file
(the functions were missing)

can anybody give me a hint please ?


I'm afraid it won't work with C++ classes and functions because each
compiler mangles (or "decorates") the exported names according to a
different scheme. Google for "name mangling" and you'll get lots to
read about it.

Also, check out the FAQ:
http://www.parashift.com/c++-faq-lit....html#faq-32.7
("Why is the linker giving errors for C/C++ functions being called
from C++/C functions?")

--
Bob Hairgrove
No**********@Home.com
Jan 26 '06 #3
On Thu, 26 Jan 2006 14:44:37 +0100, Alex
<al***************@physics.unige.ch> wrote:
The lib file is now accepted by the compiler. But I still get
unreferenced error link like this one

error LNK2001: unresolved external symbol "__declspec(dllimport) public:
bool __thiscall MyClass::IFC(void)" (__imp_?IFC@MyClass@@QAE_NXZ)


This could be a Name-Mangling issue. Different compilers use different
syntax for their name-mangling schemes. Could also be project file
inclusion error (linker can't find the class). You might need to add
the correct file to the project. It's early for me and that's all I
can think of right now. :-)

Good Luck
Jan 26 '06 #4

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

Similar topics

10
by: Minti | last post by:
I tried the following code on Borland C++ complier and Microsoft VC7.0 both seem to give conflicting results void foo(const int& x) { std::cout << "In const foo\n"; } void foo(int& x) ...
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...
24
by: serdar | last post by:
Hi. Does anybody say that what is better borland c++ or visual c++? Which compiler does have more help?
11
by: Serge Skorokhodov (216716244) | last post by:
Hi, I encounter a strange behavior of BCB 5.6. The example: #include <stdexcept> #include <memory> using namespace std; class A
17
by: Fabry | last post by:
Hi All, 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...
0
by: =?Utf-8?B?aHVzaF8wNw==?= | last post by:
help please.. :( I am recently trying to import ActiveX controls (done in Builder) to VSNET. I added it to VSNET Toolbox and dropped the control to a form. 1. It displayed an error message...
2
by: rfdes | last post by:
Hi- I could use some help resolving a problem. This explanation will be lengthy as I am trying to describe my problem without posting real code. I currently have a Win32 console application & a...
2
by: justmehere | last post by:
My understanding that this compiler is from the Borland Builder C++ 5.5 Compiler. Does anyone know where to find the complete reference for using regular expression with this compiler and the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.